std.io.file
readText function
pub fn readText(path: string): ?string
stdlib/std/io/file.lyr:17
writeText function
pub fn writeText(path: string, content: string): bool
stdlib/std/io/file.lyr:20
appendText function
pub fn appendText(path: string, content: string): bool
stdlib/std/io/file.lyr:23
exists function
pub fn exists(path: string): bool
stdlib/std/io/file.lyr:25
remove function
pub fn remove(path: string): bool
stdlib/std/io/file.lyr:28
readLines function
pub fn readLines(path: string): string[]
stdlib/std/io/file.lyr:32
size function
pub fn size(path: string): ?int
stdlib/std/io/file.lyr:41
isFile function
pub fn isFile(path: string): bool
stdlib/std/io/file.lyr:42
isDirectory function
pub fn isDirectory(path: string): bool
stdlib/std/io/file.lyr:43
copy function
pub fn copy(from: string, to: string): bool
Copies. false when the source is missing or the target is not writable.
stdlib/std/io/file.lyr:46
move function
pub fn move(from: string, to: string): bool
Moves or renames; the same operation on every file system.
stdlib/std/io/file.lyr:49
createDir function
pub fn createDir(path: string): bool
stdlib/std/io/file.lyr:51
createDirAll function
pub fn createDirAll(path: string): bool
Creates missing parent directories too. An existing directory counts as success.
stdlib/std/io/file.lyr:54
removeDir function
pub fn removeDir(path: string): bool
Deletes an EMPTY directory. There is no recursive delete; a caller that needs one writes the loop visibly.
stdlib/std/io/file.lyr:58
listDir function
pub fn listDir(path: string): string[]
The entries of a directory: names rather than paths, sorted alphabetically.
An empty array for an unreadable directory rather than a ?string[], as in readLines. A
caller that needs the difference asks isDirectory first.
stdlib/std/io/file.lyr:64
tempDir function
pub fn tempDir(): string
A path in the system's temporary directory. Does NOT create the file.
stdlib/std/io/file.lyr:67
joinPath function
pub fn joinPath(links: string, rechts: string): string
Joins two path parts, with neither a doubled nor a missing separator.
stdlib/std/io/file.lyr:81
fileName function
pub fn fileName(path: string): string
The last component. "a/b/c.txt" becomes "c.txt".
stdlib/std/io/file.lyr:114
parentDir function
pub fn parentDir(path: string): string
Everything before the last separator, or "" when there is none.
stdlib/std/io/file.lyr:120
extension function
pub fn extension(path: string): string
The extension WITHOUT the dot. "" when there is none.
A leading dot does not count: ".gitignore" has no extension, that is its name. This rule
differs between languages, so it is stated here.
jemanden herausfinden zu lassen.
stdlib/std/io/file.lyr:137
stem function
pub fn stem(path: string): string
The name without its extension. "a/b/c.txt" becomes "c".
stdlib/std/io/file.lyr:153
withExtension function
pub fn withExtension(path: string, ext: string): string
Replaces the extension. An empty extension removes it.
stdlib/std/io/file.lyr:163
isAbsolute function
pub fn isAbsolute(path: string): bool
Does the path start at the root? Recognises /x and C:\x.
stdlib/std/io/file.lyr:171