User contributions for Danilo

Jump to navigation Jump to search
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽

23 November 2023

14 November 2023

2 November 2023

11 July 2023

28 January 2023

3 October 2022

27 September 2022

  • 01:5801:58, 27 September 2022 diff hist +203 N Talk:IsVehicleOnFireCreated page with "Things to fix in this code: 1 - Function's return can be improved; it will only return false/true if the code executes the if statements 2 - < 300 Is not the actual value the vehicle starts going on fire"

26 August 2022

3 July 2022

24 January 2022

23 January 2022

19 January 2022

  • 03:5103:51, 19 January 2022 diff hist +1,368 N Modules/FileSystem/file/functionsCreated page with "==FileSystem File Functions== *read *readByte *readUByte *readShort *readUShort *readInt *readUInt *readFloat *Modules/FileSystem/file/readDouble|readDoub..."
  • 03:4903:49, 19 January 2022 diff hist +1,290 N Modules/FileSystem/file/isReadableCreated page with "__NOTOC__ This function returns whether a stream is readable. If a stream is not readable, then all read operations should result in nil operations (they will return zero bytes read or false if value reading). This state should be immutable across the lifetime of a file/stream class. ==Syntax== <syntaxhighlight lang="lua"> boolean file:isReadable () </syntaxhighlight> ==Returns== Returns '''true''' if the file/stream is readable, '''false''' otherwise. ==Example== <se..."
  • 03:4903:49, 19 January 2022 diff hist +1,120 N Modules/FileSystem/file/isWritableCreated page with "__NOTOC__ This function returns whether a stream is writable. If a stream is not writable, then all write operations should result in nil operations (they will return zero bytes written). This state should be immutable across the lifetime of a file/stream class. ==Syntax== <syntaxhighlight lang="lua"> boolean file:isWritable () </syntaxhighlight> ==Returns== Returns '''true''' if the file/stream is writable, '''false''' otherwise. ==Example== <section name="Client" cl..."
  • 03:4803:48, 19 January 2022 diff hist +1,548 N Modules/FileSystem/file/flushCreated page with "__NOTOC__ This function writes all temporary buffers of a file/stream object into the output storage. This feature shall be interpreted as a hint, not a necessity. Implementations do not have to support this feature. ==Syntax== <syntaxhighlight lang="lua"> boolean file:flush () </syntaxhighlight> ==Returns== Returns '''true''' if the file/stream has been successfully flushed, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> This sn..."
  • 03:4703:47, 19 January 2022 diff hist +1,530 N Modules/FileSystem/file/eofCreated page with "__NOTOC__ This function returns whether the runtime can still read data from the file/stream. This is an implementation defined state that should return false if no data can be immediately received using '''read operations'''. Asynchronous file/stream objects could use this function to return true when new data is available to receive from the socket. If wanting to read an entire file/stream object, this function is more reliable than the MTA:Eir/FileSystem/file/size|f..."
  • 03:4703:47, 19 January 2022 diff hist +1,464 N Modules/FileSystem/file/seekCreated page with "__NOTOC__ This function changes the location of the current stream pointer. Like that you can skip file sections, set the stream pointer to a specific location or head to the end of the file/stream object. Not all stream classes have to support this operation. ==Syntax== <syntaxhighlight lang="lua"> int file:seek ( int offset, string mode ) </syntaxhighlight> ==Arguments== *'''offset:''' the amount of bytes that should be used for the seeking operation *'''mode:''' a s..."
  • 03:4603:46, 19 January 2022 diff hist +1,148 N Modules/FileSystem/file/tellCreated page with "__NOTOC__ This function returns the current absolute position inside of the file/stream object. It should be the number of bytes that the current stream pointer is set from the beginning of the object. Not all stream classes have to support this operation. ==Syntax== <syntaxhighlight lang="lua"> int file:tell () </syntaxhighlight> ==Returns== Returns the amount of bytes that this file/stream object has already traversed. If the operation is not supported by the underly..."
  • 03:4603:46, 19 January 2022 diff hist +412 N Modules/FileSystem/file/statCreated page with "__NOTOC__ This function returns immediate statistics about this file/stream object. The output should be of same structure like that of translator.stat. ==Syntax== <syntaxhighlight lang="lua"> dictionary file:stat () </syntaxhighlight> ==Returns== Returns a dictionary that contains the immediate file statistics. ==Example== todo. {{:Modules/FileSystem/file/functions}}"
  • 03:4503:45, 19 January 2022 diff hist +1,011 N Modules/FileSystem/file/sizeCreated page with "__NOTOC__ This function returns the size of a specific file/stream from beginning to end. Not all streams have to support this operation. ==Syntax== <syntaxhighlight lang="lua"> int file:size () </syntaxhighlight> ==Returns== Returns the amount of bytes that this file/stream object is made of. ==Example== <section name="Client" class="client" show="true"> This snippet returns the contents of a file in a string buffer. <syntaxhighlight lang="lua"> local function fileGe..."
  • 03:4403:44, 19 January 2022 diff hist +541 N Modules/FileSystem/file/writeBooleanCreated page with "__NOTOC__ This function attempts to write a boolean into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be one. ==Syntax== <syntaxhighlight lang="lua"> int file:writeBoolean ( boolean value ) </syntaxhighlight> ==Arguments== *'''value:''' a boolean value to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Returns '''false''' if '''value''' is not a valid bool..."
  • 03:4403:44, 19 January 2022 diff hist +627 N Modules/FileSystem/file/writeDoubleCreated page with "__NOTOC__ This function attempts to write a double into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be eight. ==Syntax== <syntaxhighlight lang="lua"> int file:writeDouble ( double value ) </syntaxhighlight> ==Arguments== *'''value:''' a number to write into the file/stream using '''double floating point precision'''; this is the highest precision and range possible ==Returns== Returns the amount of bytes writ..."
  • 03:4303:43, 19 January 2022 diff hist +573 N Modules/FileSystem/file/writeFloatCreated page with "__NOTOC__ This function attempts to write a float into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:writeFloat ( float value ) </syntaxhighlight> ==Arguments== *'''value:''' a number to write into the file/stream using '''single floating point precision''' ==Returns== Returns the amount of bytes written during the write operation. Returns '''false''' if..."
  • 03:4303:43, 19 January 2022 diff hist +39 Modules/FileSystem/file/writeUIntNo edit summary
  • 03:4203:42, 19 January 2022 diff hist +540 N Modules/FileSystem/file/writeUIntCreated page with "__NOTOC__ This function attempts to write an unsigned integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:writeUInt ( unsigned_int value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [0..4294967295] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Returns '''false..."
  • 03:4203:42, 19 January 2022 diff hist +570 N Modules/FileSystem/file/writeIntCreated page with "__NOTOC__ This function attempts to write an integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:writeInt ( int value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [-2147483648..2147483647] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Returns '''false''' if ''..."
  • 03:4103:41, 19 January 2022 diff hist +576 N Modules/FileSystem/file/writeUShortCreated page with "__NOTOC__ This function attempts to write an unsigned short integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be two. ==Syntax== <syntaxhighlight lang="lua"> int file:writeUShort ( unsigned_short value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [0..65535] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. Return false..."
  • 03:4003:40, 19 January 2022 diff hist +505 N Modules/FileSystem/file/writeShortCreated page with "__NOTOC__ This function attempts to write a short integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be two. ==Syntax== <syntaxhighlight lang="lua"> int file:writeShort ( short value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [-32786..32785] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. ==Example== todo. {{:Modul..."
  • 03:4003:40, 19 January 2022 diff hist +507 N Modules/FileSystem/file/writeUByteCreated page with "__NOTOC__ This function attempts to write an unsigned byte into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be one. ==Syntax== <syntaxhighlight lang="lua"> int file:writeUByte ( unsigned_byte value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [0..255] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. ==Example== todo. {{:Mod..."
  • 03:3903:39, 19 January 2022 diff hist +504 N Modules/FileSystem/file/writeByteCreated page with "__NOTOC__ This function attempts to write a signed byte into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be one. ==Syntax== <syntaxhighlight lang="lua"> int file:writeByte ( signed_byte value ) </syntaxhighlight> ==Arguments== *'''value:''' a number in the range of [-128..127] to write into the file/stream ==Returns== Returns the amount of bytes written during the write operation. ==Example== todo. {{:Module..."
  • 03:3803:38, 19 January 2022 diff hist +2,435 N Modules/FileSystem/file/writeCreated page with "__NOTOC__ This function attempts to write a string of bytes (characters) into the file. It returns the amount of bytes that have actually been written. ==Syntax== <syntaxhighlight lang="lua"> int file:write ( string dataString ) </syntaxhighlight> ==Arguments== *'''dataString:''' the string of data that should be written into the file ==Returns== Returns the amount of bytes that have been actually written into the file. Returns false if '''dataString''' is not a valid..."
  • 03:3703:37, 19 January 2022 diff hist +4,765 N Modules/FileSystem/file/readBooleanCreated page with "__NOTOC__ This function attempts to read a boolean (native type) from a file and return it. The amount of bytes read should be one. ==Syntax== <syntaxhighlight lang="lua"> boolean file:readBoolean () </syntaxhighlight> ==Returns== Returns a boolean if it was successfully read from the file, '''nil''' otherwise. ==Example== <section name="Client" class="client" show="true"> This snippet demonstrates a variable file format that stores player properties depending on whet..."
  • 03:3603:36, 19 January 2022 diff hist +2,851 N Modules/FileSystem/file/readDoubleCreated page with "__NOTOC__ This function attempts to read a double (native type) from a file and return it. The amount of bytes read should be eight. ==Syntax== <syntaxhighlight lang="lua"> double file:readDouble () </syntaxhighlight> ==Returns== Returns a double if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Server" class="server" show="true"> This snippet demonstrates a basic binary object map format. It can be extended to support more p..."
  • 03:3503:35, 19 January 2022 diff hist +7,589 N Modules/FileSystem/file/readFloatCreated page with "__NOTOC__ This function attempts to read a float (native type) from a file and return it. The amount of bytes read should be four. ==Syntax== <syntaxhighlight lang="lua"> float file:readFloat () </syntaxhighlight> ==Returns== Returns a float if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Server" class="server" show="true"> This snippet demonstrates a binary vehicle handling format. This saves space in comparison to a .XML..."
  • 03:3403:34, 19 January 2022 diff hist +398 N Modules/FileSystem/file/readUIntCreated page with "__NOTOC__ This function attempts to read an unsigned integer (native type) from a file and returns it. The amount of bytes read should be four. ==Syntax== <syntaxhighlight lang="lua"> unsigned_int file:readUInt () </syntaxhighlight> ==Returns== Returns an unsigned integer if it was successfully read from the file, '''false''' otherwise. ==Example== todo. {{:Modules/FileSystem/file/functions}}"
  • 03:3303:33, 19 January 2022 diff hist +1,944 N Modules/FileSystem/file/readIntCreated page with "__NOTOC__ This function attempts to read an integer (native type) from a file and return it. The amount of bytes read should be four. ==Syntax== <syntaxhighlight lang="lua"> int file:readInt () </syntaxhighlight> ==Returns== Returns an integer if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> This snippet demonstrates an encrypted Lua source code format. <syntaxhighlight lang="lua"> -- Have..."
  • 03:3203:32, 19 January 2022 diff hist +1 Modules/FileSystem/file/readUShortNo edit summary
  • 03:3203:32, 19 January 2022 diff hist +406 N Modules/FileSystem/file/readUShortCreated page with "__NOTOC__ This function attempts to read an unsigned short (native type) from a file and returns it. The amount of bytes read should be two. ==Syntax== <syntaxhighlight lang="lua"> unsigned_short file:readUShort () </syntaxhighlight> ==Returns== Returns the unsigned short integer if it was successfully read from the file, '''false''' otherwise. ==Example== todo. {{:Modules/FileSystem/file/functions}}"
  • 03:3103:31, 19 January 2022 diff hist +2,330 N Modules/FileSystem/file/readShortCreated page with "__NOTOC__ This function attempts to read a short (native type) from a file and returns it. The amount of bytes read should be two. ==Syntax== <syntaxhighlight lang="lua"> short file:readShort () </syntaxhighlight> ==Returns== Returns the short integer if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> This snippet reads and writes string buffers into a custom file format. <syntaxhighlight la..."
  • 03:3003:30, 19 January 2022 diff hist +3,084 N Modules/FileSystem/file/readUByteCreated page with "__NOTOC__ This function attempts to read an unsigned byte (native type) from a file and returns it. The amount of bytes read should be one. ==Syntax== <syntaxhighlight lang="lua"> unsigned_byte file:readUByte () </syntaxhighlight> ==Returns== Returns the unsigned byte if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> This snippet writes a Lua type into a file stream. The lua type can be any..."
  • 03:2803:28, 19 January 2022 diff hist +6,089 N Modules/FileSystem/file/readByteCreated page with "__NOTOC__ This function attempts to read a signed byte (native type) from a file and returns it. The amount of bytes read should be one. ==Syntax== <syntaxhighlight lang="lua"> signed_byte file:readByte () </syntaxhighlight> ==Returns== Returns the signed byte if it was successfully read from the file, '''false''' otherwise. ==Example== <section name="Server" class="server" show="true"> This snippet writes a snapshot of server-side player information into a file. This..."
  • 03:2703:27, 19 January 2022 diff hist +1,429 N Modules/FileSystem/file/readCreated page with "__NOTOC__ This function attempts to read the specified amount of bytes from the file. The actual amount of bytes read equals to the length of the Lua string. ==Syntax== <syntaxhighlight lang="lua"> string file:read ( int readCount ) </syntaxhighlight> ==Arguments== *'''readCount:''' the amount of bytes to read from the file ==Returns== This function returns a string that contains the bytes that have been read from the file. ==Example== <section name="Client" class="c..."
  • 03:2303:23, 19 January 2022 diff hist 0 Modules/FileSystemNo edit summary
  • 03:2203:22, 19 January 2022 diff hist −1 Modules/FileSystem/functionsNo edit summary
  • 03:1903:19, 19 January 2022 diff hist +1,221 N Modules/FileSystem/translator/functionsCreated page with "==FileSystem Translator Functions== *open *exists *createDir *chdir *delete *copy *rename *size *Modules/FileSystem/translator..."
  • 03:1103:11, 19 January 2022 diff hist +262 N Modules/FileSystem/functionsCreated page with "==FileSystem Library Functions== *createFilesystemInterface {{:Modules/FileSystem/namespace/functions}} {{:Modules/FileSystem/translator/functions}} {{:Modules/FileSystem/file/functions}}"
  • 03:0903:09, 19 January 2022 diff hist +61 MTA:Eir/FileSystem/functionsUndo revision 73642 by Danilo (talk) current Tag: Undo
  • 03:0803:08, 19 January 2022 diff hist −61 MTA:Eir/FileSystem/functions→‎FileSystem Library Functions
  • 03:0403:04, 19 January 2022 diff hist +470 N Modules/FileSystem/translator/getPathProcessingModeCreated page with "__NOTOC__ This function gets the path-processing-mode for the given file translator. ==Syntax== <syntaxhighlight lang="lua"> string translator:getPathProcessingMode () </syntaxhighlight> ==Returns== This function returns a string describing the current path-processing-mode of the translator. ===Possible Return Values=== *distinguished *ambivalent_file ==Example== <syntaxhighlight lang="lua"> -- TODO </syntaxhighlight> {{:Modules/FileSystem/translator/functions}}"
  • 03:0403:04, 19 January 2022 diff hist +583 N Modules/FileSystem/translator/setPathProcessingModeCreated page with "__NOTOC__ This function sets the path-processing-mode for the file translator. The path-processing-mode describes how paths are handled in detail during file-path consuming function calls. ==Syntax== <syntaxhighlight lang="lua"> void translator:setPathProcessingMode( string mode ) </syntaxhighlight> ==Arguments== *'''mode:''' value for the translator path-processing-mode (either '''distinguished''' or '''ambivalent_file''') ==Returns== This function returns nil. ==Ex..."
  • 03:0303:03, 19 January 2022 diff hist +589 N Modules/FileSystem/translator/getOutbreakEnabledCreated page with "__NOTOC__ This function gets the outbreak-policy of a file translator. If outbreak is enabled then file path requests outside of the translator root are allowed. Otherwise the user can only access files that are accessible from inside the translator root directory. ==Syntax== <syntaxhighlight lang="lua"> bool translator:setOutbreakEnabled () </syntaxhighlight> ==Returns== This function returns true if the outbreak-policy is enabled for this translator, false otherwise...."
  • 03:0203:02, 19 January 2022 diff hist +603 N Modules/FileSystem/translator/setOutbreakEnabledCreated page with "__NOTOC__ This function sets the outbreak-policy of a file translator. If outbreak is enabled then file path requests outside of the translator root are allowed. Otherwise the user can only access files that are accessible from inside the translator root directory. ==Syntax== <syntaxhighlight lang="lua"> void translator:setOutbreakEnabled ( bool enabled ) </syntaxhighlight> ==Arguments== *'''enabled:''' value for the translator outbreak-policy ==Returns== This functio..."
  • 03:0203:02, 19 January 2022 diff hist +1,762 N Modules/FileSystem/translator/getFilesCreated page with "__NOTOC__ This function returns a list of all files that are found under the wild-card and directory parameters. It is similar to scanDir but returns files only. ==Syntax== <syntaxhighlight lang="lua"> table translator:getFiles ( string dirPath, string wildcard, bool recursive ) </syntaxhighlight> ==Arguments== *'''dirPath:''' a path to the directory the scan shall take place or start in *'''wildcard:''' glob-style wild-card fo..."
  • 03:0103:01, 19 January 2022 diff hist +1,626 N Modules/FileSystem/translator/getDirsCreated page with "__NOTOC__ This function returns a list of all directories that are found under the directory path. It is similar to scanDir but returns directories only. ==Syntax== <syntaxhighlight lang="lua"> table translator:getDirs ( string dirPath, bool recursive ) </syntaxhighlight> ==Arguments== *'''dirPath:''' a path to the directory the scan shall take place or start in *'''recursive:''' a boolean that specifies whether the whole direc..."
  • 03:0003:00, 19 January 2022 diff hist +3,387 N Modules/FileSystem/translator/scanDirExCreated page with "__NOTOC__ This function loops through all translator filesystem entries that are captured by the wildcard and the directory specifier. The wildcard is glob-style and supports '''*''' and '''?''' modifiers. The scan can be made recursive to enter every directory it finds, so that files and folders of a whole directory tree are captured. This function is used to process filesystem objects inside of directories without having to add the filenames into a configuration file...."
  • 02:5902:59, 19 January 2022 diff hist +2,914 N Modules/FileSystem/translator/scanDirCreated page with "__NOTOC__ This function loops through all translator filesystem entries that are captured by the wildcard and the directory specifier. The wildcard is glob-style and supports '''*''' and '''?''' modifiers. The scan can be made recursive to enter every directory it finds, so that files and folders of a whole directory tree are captured. This function is used to process filesystem objects inside of directories without having to add the filenames into a configuration file...."
  • 02:5802:58, 19 January 2022 diff hist +1,410 N Modules/FileSystem/translator/absPathRootCreated page with "__NOTOC__ This function resolves a specified path into its absolute version. The path is resolved from the translator root. This function can be used to get a unique version of a path (without scripting symbols such as '..'). ==Syntax== <syntaxhighlight lang="lua"> string translator:absPathRoot ( string path ) </syntaxhighlight> ==Arguments== *'''path:''' the path that should be resolved into an absolute path; can be nil to return the absolute location of the translato..."
  • 02:5702:57, 19 January 2022 diff hist +1,053 N Modules/FileSystem/translator/absPathCreated page with "__NOTOC__ This function resolves a specified path into its absolute version. This function can be used to get a unique version of a path (without scripting symbols such as '..'). ==Syntax== <syntaxhighlight lang="lua"> string translator:absPath ( string path ) </syntaxhighlight> ==Arguments== *'''path:''' the path that should be resolved into an absolute path; can be nil to return the absolute location of the current directory. ==Returns== This function returns the ab..."
  • 02:5702:57, 19 January 2022 diff hist +1,488 N Modules/FileSystem/translator/relPathRootCreated page with "__NOTOC__ This function transform a path that is passed to it into a path that is relative to the translators root directory. The path must be accessible from the translator. The path can either be absolute or relative. ==Syntax== <syntaxhighlight lang="lua"> string translator:relPathRoot ( string path ) </syntaxhighlight> ==Arguments== *'''path:''' the path that should be transformed into a relative path; can be nil to return the '''null path''' ==Returns== This func..."
  • 02:5602:56, 19 January 2022 diff hist +1,252 N Modules/FileSystem/translator/relPathCreated page with "__NOTOC__ This function transform a path that is passed to it into a path that is relative to the translators current directory. The path must be accessible from the translator. The path can either be absolute or relative. ==Syntax== <syntaxhighlight lang="lua"> string translator:relPath ( string path ) </syntaxhighlight> ==Arguments== *'''path:''' the path that should be transformed into a relative path; can be nil if the current directory should be returned ==Return..."
  • 02:5502:55, 19 January 2022 diff hist +1,434 N Modules/FileSystem/translator/statCreated page with "__NOTOC__ This function queries common information about a filesystem object and returns it as a dictionary. Example of its return value: <syntaxhighlight lang="lua"> { accessTime = 1390997951, -- OS specific time information creationTime = 1381999749, -- OS specific time information modTime = 1381872826, -- OS specific time information size = 1441280, -- size of the filesystem object in bytes }; </syntaxhighlight> ==Syntax== <syntaxhighlight lang="lua">..."
  • 02:5402:54, 19 January 2022 diff hist +1,375 N Modules/FileSystem/translator/sizeCreated page with "__NOTOC__ This function queries the size of a filesystem object. The size of a filesystem object is the count of bytes that it logically fills on the storage media. ==Syntax== <syntaxhighlight lang="lua"> int translator:size ( string filePath ) </syntaxhighlight> ==Arguments== *'''filePath:''' the path to the filesystem object that you want to get the size of ==Returns== This function returns the count of bytes that the filesystem object is logically taking on the sto..."
  • 02:5302:53, 19 January 2022 diff hist +1,048 N Modules/FileSystem/translator/renameCreated page with "__NOTOC__ This function moves a file from a source location to a destination location inside of a filesystem. This function is the fastest way to move data from one location to another. ==Syntax== <syntaxhighlight lang="lua"> bool translator:rename ( string srcPath, string dstPath ) </syntaxhighlight> ==Arguments== *'''srcPath:''' a path to the source file *'''dstPath:''' the path to the destination location where the source file should be moved to ==Returns== This fu..."
  • 02:5302:53, 19 January 2022 diff hist +1,163 N Modules/FileSystem/translator/copyCreated page with "__NOTOC__ This function copies a file from a source location to a file at the destination. The contents of the source file are copied, so that source and destination have the same content. Since the transactions happen through kernel-calls, this function is faster than performing the copying yourself through Lua strings. ==Syntax== <syntaxhighlight lang="lua"> bool translator:copy ( string srcPath, string dstPath ) </syntaxhighlight> ==Arguments== *'''srcPath:''' a pat..."
  • 02:5202:52, 19 January 2022 diff hist +1,004 N Modules/FileSystem/translator/deleteCreated page with "__NOTOC__ This function deletes an entry on the translator filesystem. If the path points at a directory, the whole content of it is recursively deleted. A typical reason when deletion may fail is when the file is opened in another OS handle. Proper clean-up of file classes can prevent this issue. ==Syntax== <syntaxhighlight lang="lua"> bool translator:delete ( string path ) </syntaxhighlight> ==Arguments== *'''path:''' a path to a filesystem object that should be wipe..."
  • 02:5102:51, 19 January 2022 diff hist +1,704 N Modules/FileSystem/translator/chdirCreated page with "__NOTOC__ This function changes the current directory pointer of the translator. All operations on the FileSystem translator are executed relative to the current directory. The translator, if possible, is asked to prevent deletion of the current directory. ==Syntax== <syntaxhighlight lang="lua"> bool translator:chdir ( string dirPath ) </syntaxhighlight> ==Arguments== *'''dirPath:''' a path to a directory that should be made current directory ==Returns== This functio..."
  • 02:5002:50, 19 January 2022 diff hist +1,186 N Modules/FileSystem/translator/createDirCreated page with "__NOTOC__ This function creates a directory inside of a translator directory hierarchy. ==Syntax== <syntaxhighlight lang="lua"> bool translator:createDir ( string dirPath ) </syntaxhighlight> ==Arguments== *'''dirPath:''' a path to a directory that should be created ==Returns== This function returns '''true''' if the given path is a valid directory path relative to the translator, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> T..."
  • 02:4902:49, 19 January 2022 diff hist +1,164 N Modules/FileSystem/translator/existsCreated page with "__NOTOC__ This function checks whether a specified file exists on a MTA:Eir FileSystem translator. ==Syntax== <syntaxhighlight lang="lua"> bool translator:exists ( string filePath ) </syntaxhighlight> ==Arguments== *'''filePath:''' the path to the file that should exist ==Returns== This function returns '''true''' if the given path points to a valid file instance on a FileSystem, '''false''' otherwise. ==Example== <section name="Client" class="client" show="true"> T..."
  • 02:4702:47, 19 January 2022 diff hist +3,620 N Modules/FileSystem/translator/openCreated page with "__NOTOC__ This function opens a link to a file instance on a given MTA:Eir FileSystem translator. Using a file link, you can write and/or receive data from filesystems. ==Syntax== <syntaxhighlight lang="lua"> file, string translator:open ( string filePath, string fileMode ) </syntaxhighlight> ==Arguments== *'''filePath:''' the path to the file that should be opened *'''fileMode:''' an ANSI file mode descriptor (can be 'w', 'r' or 'a', with 'b' and/or '+' appended) ==R..."
  • 02:4202:42, 19 January 2022 diff hist +1,753 N Modules/FileSystem/createFilesystemInterfaceCreated page with "__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== <syntaxhighlight lang="lua"> table createFilesystemInterface () </syntaxhighligh..." current
  • 00:0300:03, 19 January 2022 diff hist +738 N Modules/FileSystem/namespace/functionsCreated page with " ==FileSystem Namespace Functions== *createTranslator *createRAMDisk *createMemoryFile *createFileIterative *copyFile *copyStream *copyStreamCount *Modules/FileSystem/pathToFilename|pat..."

18 January 2022

  • 23:5923:59, 18 January 2022 diff hist +404 N Modules/FileSystem/getDoBufferAllRawCreated page with "__NOTOC__ This function returns the value of the buffering-policy for newly created raw-file handles. ==Syntax== <syntaxhighlight lang="lua"> bool fsnamespace.getDoBufferAllRaw() </syntaxhighlight> ==Returns== This function returns true if the buffering-policy is enabled, false otherwise. ==Example== <syntaxhighlight lang="lua"> -- TODO </syntaxhighlight> {{:Modules/FileSystem/namespace/functions}}"
  • 23:5823:58, 18 January 2022 diff hist +661 N Modules/FileSystem/setDoBufferAllRawCreated page with "__NOTOC__ This function changes the raw-file buffering policy of newly created file streams. If the buffering-policy is enabled then each newly created file stream is wrapped inside of a custom FileSystem buffering handle. File stream modifications that are close to each other are batched together for optimizational purposes. ==Syntax== <syntaxhighlight lang="lua"> void fsnamespace.setDoBufferAllRaw( bool enabled ) </syntaxhighlight> ==Arguments== *'''enabled''': new v..."
  • 23:5723:57, 18 January 2022 diff hist +576 N Modules/FileSystem/typeCreated page with "__NOTOC__ This function returns the type of the given Eir FileSystem object. ==Syntax== <syntaxhighlight lang="lua"> string fsnamespace.type( userdata obj ) </syntaxhighlight> ==Arguments== *'''obj''': the Eir FileSystem object to retrieve the type from ==Returns== This function returns the type string of the queried object, false if not successful. For destroyed objects the return value is always false. ===Possible Return Values=== *file *file-translator ==Example=..."
  • 23:5423:54, 18 January 2022 diff hist +559 N Modules/FileSystem/topointerCreated page with "__NOTOC__ This function returns the light-userdata representation of the object. This is the direct pointer into the Eir FileSystem module handle. ==Syntax== <syntaxhighlight lang="lua"> light-userdata fsnamespace.topointer( userdata obj ) </syntaxhighlight> ==Arguments== *'''obj''': the userdata of the Eir FileSystem Lua environment ==Returns== This function returns the light-userdata value of the internal object, false if not successful. ==Example== <syntaxhighligh..."
  • 23:5323:53, 18 January 2022 diff hist +731 N Modules/FileSystem/streamCompareCreated page with "__NOTOC__ This function compares the bytes of two streams for equality. The comparison starts from the current file seek and finishes at the end of the respective file stream. If the read count of either stream does not match the other, then this function fails. ==Syntax== <syntaxhighlight lang="lua"> bool fsnamespace.streamCompare( file left, file right ) </syntaxhighlight> ==Arguments== *'''left''': first file for equality comparison *'''right''': second file for equ..."
  • 23:5123:51, 18 January 2022 diff hist +641 N Modules/FileSystem/pathToFilenameCreated page with "__NOTOC__ This function returns the filename and the direction portions of a filepath, seperated into two strings. ==Syntax== <syntaxhighlight lang="lua"> string, string fsnamespace.pathToFilename( string path, bool includeExtention ) </syntaxhighlight> ==Arguments== *'''path''': the file path to extract from *'''includeExtention''': if true then the filename extention is included in the result ==Returns== This function returns the filename and directory of the provid..."
  • 23:5023:50, 18 January 2022 diff hist +977 N Modules/FileSystem/copyStreamCountCreated page with "__NOTOC__ This function copies data starting from a source file stream into a specified destination stream. The copy of data is performed starting from the source file seek. The copy is only performed up to a specified count of bytes. Read operations on the file streams advance the seek pointers. Thus the seek pointers stay changed after the function has completed. ==Syntax== <syntaxhighlight lang="lua"> bool fsnamespace.copyStreamCount( file src, file dst, int count )..."
  • 23:4923:49, 18 January 2022 diff hist +838 N Modules/FileSystem/copyStreamCreated page with "__NOTOC__ This function copies data starting from a source file stream into a specified destination stream. The copy of data is performed starting from the source file seek. Read operations on the file streams advance the seek pointers. Thus the seek pointers stay changed after the function has completed. ==Syntax== <syntaxhighlight lang="lua"> bool fsnamespace.copyStream( file src, file dst ) </syntaxhighlight> ==Arguments== *'''src''': source of the copy operation,..."
  • 23:4823:48, 18 January 2022 diff hist +710 N Modules/FileSystem/copyFileCreated page with "__NOTOC__ This function copies files between two translators. ==Syntax== <syntaxhighlight lang="lua"> bool fsnamespace.copyFile( translator srcTrans, string srcPath, translator dstTrans, string dstPath ) </syntaxhighlight> ==Arguments== *'''srcTrans:''' source translator for the file of origin *'''srcPath:''' path into the source translator *'''dstTrans:''' target translator *'''dstPath:''' path into the target translator ==Returns== This function returns true if the..."
  • 23:4623:46, 18 January 2022 diff hist +1,041 N Modules/FileSystem/createFileIterativeCreated page with "__NOTOC__ This function attempts to create a file with numeric iteration for filename collision avoidance. If a specific filename is taken then an the algorithm will try to create the next file with increased numeric insert. ==Syntax== <syntaxhighlight lang="lua"> file fsnamespace.createFileIterative( translator target, string prefix, string suffix, int maxIterations ) </syntaxhighlight> ==Arguments== *'''target''': the file translator based on which to create the file..."
  • 23:4423:44, 18 January 2022 diff hist +424 N Modules/FileSystem/createMemoryFileCreated page with "__NOTOC__ This function creates a single file that is resident entirely in system memory. ==Syntax== <syntaxhighlight lang="lua"> file fsnamespace.createMemoryFile( ) </syntaxhighlight> ==Returns== This function returns a new file object if successful, false otherwise. ==Example== <syntaxhighlight lang="lua"> -- TODO </syntaxhighlight> {{:Modules/FileSystem/namespace/functions}} {{:Modules/FileSystem/file/functions}}"
  • 23:4023:40, 18 January 2022 diff hist +3,225 N Modules/FileSystem/createTranslatorCreated page with "__NOTOC__ This function creates a FileSystem translator. A FileSystem translator represents a directory on a real or virtual filesystem. Through translators you get access to the files that reside in their directory trees. The translator returned by this function usually represents an OS filesystem directory. ==Syntax== <syntaxhighlight lang="lua"> translator fsnamespace.createTranslator( string rootPath ) </syntaxhighlight> ==Arguments== *'''rootPath:''' the absolute..."
  • 23:3223:32, 18 January 2022 diff hist +771 N Modules/FileSystem/createRAMDiskCreated page with "__NOTOC__ This function creates a FileSystem translator which is located entirely inside of MTA application memory, also known as RAM. ==Syntax== <syntaxhighlight lang="lua"> translator fsnamespace.createRAMDisk( bool caseSensitive ) </syntaxhighlight> ==Arguments== *'''caseSensitive:''' if true then all namespaces are compared case sensitively in path operations, otherwise strict character equality comparison is performed ==Returns== This function returns a new '''Fi..."

18 April 2021

24 October 2020

5 September 2020

2 September 2020

15 August 2020

10 August 2020

5 August 2020

26 July 2020

4 July 2020

3 June 2020

28 May 2020

24 May 2020

23 May 2020

13 May 2020

9 March 2020

28 February 2020

26 February 2020

5 February 2020

3 February 2020

13 January 2020

29 December 2019

25 December 2019

7 November 2019

28 October 2019

26 October 2019

15 October 2019

12 October 2019

8 October 2019

30 September 2019

29 September 2019

24 September 2019

20 September 2019

14 September 2019

6 September 2019

4 September 2019

27 August 2019

12 August 2019

11 August 2019

6 August 2019

27 July 2019

11 July 2019

3 July 2019

2 July 2019

28 June 2019

24 June 2019

21 June 2019

13 June 2019

10 June 2019

28 May 2019

27 February 2019

21 February 2019

19 February 2019

18 February 2019

26 January 2019

18 January 2019

25 February 2018

14 September 2017

27 October 2015

21 October 2015

13 October 2015

15 October 2014

19 March 2014

24 February 2014

16 June 2013

7 May 2013

23 April 2013

17 April 2013

16 March 2013

13 March 2013

12 March 2013

16 February 2013

7 January 2013

19 October 2012

18 August 2012

17 August 2012

6 July 2012

28 May 2012

27 May 2012

26 May 2012

21 May 2012

26 April 2012

6 April 2012

4 April 2012