marta

Class File

Equatable

Represents a file in a file system.

Simply speaking, a File is a FileSystem plus a Path. Particular instances of File may also carry additional information, speeding up their handling, though.

Implements __tostring(), returning path.rawValue.

class marta.File {

let extension: String

let fileSystem: FileSystem

let isLocal: Boolean

let isRoot: Boolean

let name: String

let nameWithoutExtension: String

let parent: File?

let path: Path

fun canonicalize(): Error?, File?

fun delete(): Error?

fun exists(): Boolean

fun getChildren(): FileIterator

fun hasPrefix(parent): Boolean

fun isOnSameVolume(other): Boolean

fun makeFolder(mode): Error?

fun makeSymbolicLink(target, mode): Error?

fun readInfo(flag): Error?, FileInfo?

fun readSymbolicLink(): Error?, String?

fun readText(): Error?, String

fun rename(target): Error?

fun resolve(pathComponents): File

fun writeText(text, flags, mode): Error?

}