Buy Me a Coffee at ko-fi.com

A global API that contains features to work with files

Checks if FileAPI can be used for this avatar

overload 1:
FileAPI.allowed(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Deletes file/directory at specified path. Returns true if successful

overload 1:
FileAPI.delete(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Checks if file/directory at specified path exists

overload 1:
FileAPI.exists(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Checks if specified path is directory

overload 1:
FileAPI.isDirectory(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Checks if specified path is file

overload 1:
FileAPI.isFile(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Checks if this path is allowed for usage

overload 1:
FileAPI.isPathAllowed(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Lists all files and directories at specified path, or returns null if directory does not exist or path is not a directory

overload 1:
FileAPI.list(path: String): Table
typings.-1808118735typings.80563118
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Creates a directory at specified path. Returns true if folder was successfully created

overload 1:
FileAPI.mkdir(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Creates a directory at specified path including all parent directories. Returns true if folder was successfully created

overload 1:
FileAPI.mkdirs(path: String): Boolean
typings.-1808118735typings.1729365000
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Opens an input stream for file at specified path

overload 1:
FileAPI.openReadStream(path: String): InputStream
typings.-1808118735typings.1361886154
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Opens an output stream for file at specified path

overload 1:
FileAPI.openWriteStream(path: String): OutputStream
typings.-1808118735typings.33956865
Method PropertyFluent DescriptionRepresentation
path accepts
Return Value

Reads whole file as string

overload 1:
FileAPI.readString(path: String, encoding: String): String
typings.-1808118735typings.-1808118735typings.-1808118735
Method PropertyFluent DescriptionRepresentation
path accepts
encoding accepts
Return Value

Writes a string to a file

overload 1:
FileAPI.writeString(path: String, data: String, encoding: String): nil
typings.-1808118735typings.-1808118735typings.-1808118735typings.109073
Method PropertyFluent DescriptionRepresentation
path accepts
data accepts
encoding accepts
Return Value