LifeLua 30-05-2025
Documentation for LifeLua
Loading...
Searching...
No Matches
io

Lua IO library extension. More...

Functions

number io.crc32 (string string)
 
string io.sha1 (string string)
 
string io.md5 (string string)
 
nil or boolean io.workpath (string path)
 
boolean io.exists (string path)
 
nil io.newfolder (string path)
 
nil io.delete (string path)
 
table io.readsfo (string path)
 
nil io.editsfo (string path)
 
table io.list (string path)
 
string io.filestrip (string path)
 
string io.pathstrip (string path)
 
number io.freespace (string partition)
 
number io.totalspace (string partition)
 

Detailed Description

Function Documentation

◆ io.crc32()

number io.crc32 ( string string)

Gets the CRC32 hash of a string

◆ io.delete()

nil io.delete ( string path)

Deletes a file or a folder

◆ io.editsfo()

nil io.editsfo ( string path)

Edits a parameter in a .SFO file

◆ io.exists()

boolean io.exists ( string path)

Checks if a file or folder exists or not

◆ io.filestrip()

string io.filestrip ( string path)

Strips the last file/directory from a path

◆ io.freespace()

number io.freespace ( string partition)

Gets the free space of a partition

◆ io.list()

table io.list ( string path)

Lists a directory

Returns
A list of tables that represent a file/folder with these keys:
  • "name": string
  • "path": string
  • "isafolder": boolean
  • "created": string
  • "modified": string
  • "accessed": string
  • "size": number

◆ io.md5()

string io.md5 ( string string)

Gets the MD5 hash of a string

◆ io.newfolder()

nil io.newfolder ( string path)

Creates a new folder

◆ io.pathstrip()

string io.pathstrip ( string path)

Strips the files/directories from a path besides the last one

◆ io.readsfo()

table io.readsfo ( string path)

Reads a .SFO file

Returns
A table with the keys & values of the .SFO

◆ io.sha1()

string io.sha1 ( string string)

Gets the SHA1 hash of a string

◆ io.totalspace()

number io.totalspace ( string partition)

Gets the size of a partition

◆ io.workpath()

nil or boolean io.workpath ( string path)

Gets or sets the working path

Parameters
pathIf defined, the work path will be set to the defined path