vibe.d beta banner
get vibe.d
0.8.1

Asynchronous I/O that doesn’t get in your way, written in D

Module vibe.core.file

File handling functions and types.

Functions

NameDescription
appendToFile(path, data)Convenience function to append to a file.
copyFile(from, to)Copies a file.
createDirectory(path)Creates a new directory.
createTempFile(suffix)Creates and opens a temporary file for writing.
existsFile(path)Checks if a file exists
getFileInfo(path)Stores information about the specified file/directory into 'info'
getWorkingDirectory()Returns the current working directory.
iterateDirectory(path)Enumerates all files in the specified directory.
listDirectory(path, del)Enumerates all files in the specified directory.
moveFile(from, to)Moves or renames a file.
openFile(path, mode)Opens a file stream with the specified mode.
readFile(path, buffer, max_size)Read a whole file into a buffer.
readFileUTF8(path)Read a whole UTF-8 encoded file into a string.
removeFile(path)Removes a file
watchDirectory(path, recursive)Starts watching a directory for changes.
watchDirectory(path, recursive)
writeFile(path, contents)Write a whole file at once.
writeFileUTF8(path, contents)Write a string into a UTF-8 encoded file.

Interfaces

NameDescription
DirectoryWatcherInterface for directory watcher implementations.
FileStreamAccesses the contents of a file as a stream.

Structs

NameDescription
DirectoryChangeDescribes a single change in a watched directory.
FileInfoContains general information about a file.

Enums

NameDescription
DirectoryChangeTypeSpecifies the kind of change in a watched directory.
FileModeSpecifies how a file is manipulated on disk.
Authors

Sönke Ludwig

Copyright

© 2012-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.