<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Modules/FileSystem/createFilesystemInterface?action=history&amp;feed=atom</id>
	<title>Modules/FileSystem/createFilesystemInterface - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Modules/FileSystem/createFilesystemInterface?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/FileSystem/createFilesystemInterface&amp;action=history"/>
	<updated>2026-07-05T14:40:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/FileSystem/createFilesystemInterface&amp;diff=73620&amp;oldid=prev</id>
		<title>Danilo: Created page with &quot;__NOTOC__ This function creates a FileSystem access point. An access point is your personal instance of the Eir FileSystem. The table returned by this function is the module namespace. There are no limits as to how many access points can be live at a time.  '''When using the fileSystem module, it is highly suggested to restrict access to this function to priviledged resources!'''  ==Syntax== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; table createFilesystemInterface () &lt;/syntaxhighligh...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/FileSystem/createFilesystemInterface&amp;diff=73620&amp;oldid=prev"/>
		<updated>2022-01-19T02:42:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ This function creates a FileSystem access point. An access point is your personal instance of the Eir FileSystem. The table returned by this function is the module namespace. There are no limits as to how many access points can be live at a time.  &amp;#039;&amp;#039;&amp;#039;When using the fileSystem module, it is highly suggested to restrict access to this function to priviledged resources!&amp;#039;&amp;#039;&amp;#039;  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; table createFilesystemInterface () &amp;lt;/syntaxhighligh...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
This function creates a FileSystem access point. An access point is your personal instance of the Eir FileSystem. The table returned by this function is the module namespace. There are no limits as to how many access points can be live at a time.&lt;br /&gt;
&lt;br /&gt;
'''When using the fileSystem module, it is highly suggested to restrict access to this function to priviledged resources!'''&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table createFilesystemInterface ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
This function returns the table that denotes the '''FileSystem module namespace'''.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This snippet sets up access to your resource in a simple server-side resource environment when using the FileSystem module.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Create the interface.&lt;br /&gt;
local fsys = createFilesystemInterface();&lt;br /&gt;
&lt;br /&gt;
-- Make sure we have access to the module.&lt;br /&gt;
-- Access could be blocked by acl.xml priviledges.&lt;br /&gt;
if not ( fsys ) then&lt;br /&gt;
    outputDebugString( &amp;quot;could not create FileSystem interface&amp;quot; );&lt;br /&gt;
    return false;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Assume the resource is located inside a folder in the deathmatch resources directory.&lt;br /&gt;
-- Then we create a raw OS filesystem link to it.&lt;br /&gt;
local resRoot = fsys.createTranslator( &amp;quot;mods/deathmatch/resources/&amp;quot; .. getResourceName(resource) .. &amp;quot;/&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
-- Check that we have access (i.e. passed OS priviledges test) for this folder.&lt;br /&gt;
-- Will fail if the resource is not inside a folder in the deathmatch resources directory.&lt;br /&gt;
if not ( resRoot ) then&lt;br /&gt;
    outputDebugString( &amp;quot;cannot link resource instance directory&amp;quot; );&lt;br /&gt;
    return false;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Open the &amp;quot;meta.xml&amp;quot; file.&lt;br /&gt;
local metaFile = resRoot.open( &amp;quot;meta.xml&amp;quot;, &amp;quot;rb&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
-- Success!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{:Modules/FileSystem/functions}}&lt;/div&gt;</summary>
		<author><name>Danilo</name></author>
	</entry>
</feed>