io


Functions

chmod(filename : string, mode : integer)

->result : boolean, error : string?, error_code : integer?

Change permissions of a file, folder or link. mode is a unix permission styled octal number (like 755 - WITHOUT a leading octal 0). Executable, group and others flags are ignored on windows and won't fire errors

exists(filename : string)

->boolean

Returns true when a file, folder or link at the given path and name exists

stat(filename : string)

->result : Stat?, error : string?, error_code : integer?

Returns a table with status info about the file, folder or link at the given path and name, else nil the error and the error code is returned.


Local Structs

Stat

return value for io.stat


Properties

atime : integer

last access time in seconds since the epoch

ctime : integer

inode change time (NOT creation time!) in seconds

dev : integer

device number of filesystem

gid : integer

numeric group ID of file's owner

ino : integer

inode number

mode : integer

unix styled file permissions

mtime : integer

last modify time in seconds since the epoch

number of (hard) links to the file

rdev : integer

the device identifier (special files only)

size : integer

total size of file, in bytes

type : "file" | "directory" | "link" | "socket" | "named pipe" | "char device" | "block device"

uid : integer

numeric user ID of file's owner