Class IO.File

implements IO.Path

Represents a file in the filesystem

Constructors

File(string path)

Properties

path the path as a string.
name the file or folder name portion of the path as a string.

Methods

exists() returns true if the file or folder exists in the filesystem.
folder() returns true if the path is a folder.
len() the size of the file
readAll() reads the entire contents of the file into a string
writeAll(string body)

Constructor Documentation


File(string path)

Parameters

Property Documentation


string path

The path as a string.


string name

The file or folder name portion of the path as a string.

Method Documentation


bool exists()

Returns true if the file or folder exists in the filesystem.

Returns


bool folder()

Returns true if the path is a folder.

Returns


integer len()

The size of the file

Returns


string readAll()

Reads the entire contents of the file into a string

Returns


void writeAll(string body)

Parameters



Creative Commons Logo This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.