Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:File/doc: Difference between revisions

From Neodyland Wiki
Created page with '{{Mdl}}'
 
m usage etc.
Line 1: Line 1:
{{Mdl}}
== Scope ==
File title and file information. If the code here grows beyond a border line, this should be converted to an interface and the processing code should be outsourced.
 
== Usage ==
=== From Wikitext ===
Search ({{key press|Ctrl|F}}) for <code>@exports</code>.
:Example: <code><nowiki>{{#invoke:File|extension|file=File:Test.jpg}}</nowiki></code> → <code>{{#invoke:File|extension|file=File:Test.jpg}}</code>
 
=== From Lua ===
<source lang="Lua">
local file = require('Module:File')
local fileObj = file.File("Foo.bar.svg")
local withoutExtension = fileObj.woExtension()
</source>

Revision as of 18:49, 20 December 2013

Scope

File title and file information. If the code here grows beyond a border line, this should be converted to an interface and the processing code should be outsourced.

Usage

From Wikitext

Search (Template:Key press) for @exports.

Example: {{#invoke:File|extension|file=File:Test.jpg}}jpg

From Lua

local file = require('Module:File')
local fileObj = file.File("Foo.bar.svg")
local withoutExtension = fileObj.woExtension()
Cookies help us deliver our services. By using our services, you agree to our use of cookies.