Import with #import "std/guest_files".

FILE_MISSING :: -1
FILE_DIRECTORY :: -2
FileStatus :: (path: string) -> s64

Needs a host capability.

FileRead :: (path: string) -> (string, bool)

The whole file, or ok false when it is missing, a directory or unreadable.

Needs a host capability.

FileWrite :: (path: string, data: string) -> bool

Replaces the file with data; false when it could not be written.

Needs a host capability.

FileRemove :: (path: string) -> bool

Needs a host capability.

FileRename :: (source: string, destination: string) -> bool

Needs a host capability.

DirectoryMake :: (path: string) -> bool

Needs a host capability.

DirectoryList :: (path: string) -> string

Needs a host capability.

Source ↗ · All modules