ae.sys.vfs

A basic virtual filesystem API. Intended as a drop-in std.file replacement. VFS driver is indicated by "driver://" prefix ("//" cannot exist in a valid filesystem path).

Modules

curl
module ae.sys.vfs.curl

VFS driver for curl.

net
module ae.sys.vfs.net

VFS driver over ae.sys.net.

Members

Classes

VFS
class VFS

Abstract VFS driver base class.

Functions

copy
void copy(string from, string to)

std.file shims

ensurePathExists
void ensurePathExists(string fn)

ae.sys.file shims

getVFS
VFS getVFS(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
getVFSName
string getVFSName(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
isVFSPath
bool isVFSPath(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
listDir
string[] listDir(string path)

Enumerate directory entries. Returns an array of file/directory names only.

mdFile
ubyte[16] mdFile(string path)

Get MD5 digest of file at location.

mkdir
void mkdir(string path)

Create an empty directory.

mkdirRecurse
void mkdirRecurse(string path)

Create directory (and parents as necessary) at location, if it does not exist.

move
void move(string src, string dst)

ae.sys.file shims

read
void[] read(string path)

Read entire file at given location.

readText
S readText(string name)

std.file shims

remove
void remove(string path)

Delete file at location.

rename
void rename(string from, string to)

Rename file at location. Clobber destination, if it exists.

rmdirRecurse
void rmdirRecurse(string path)

Remove a directory and all its contents recursively.

safeWrite
void safeWrite(string fn, void[] data)

ae.sys.file shims

testVFS
void testVFS(string base)

Test a VFS at a certain path. Must end with directory separator.

touch
void touch(string path)

ae.sys.file shims

write
void write(string path, const(void)[] data)

Write entire file at given location (overwrite if exists).

Properties

exists
bool exists [@property getter]

Check if file/directory exists at location.

Variables

registry
VFS[string] registry;
Undocumented in source.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>