tango.io.vfs.FileFolder

License:
BSD style:

Version:
Oct 2007: Initial version

author:
Kris

class FileFolder: tango.io.vfs.model.Vfs.VfsFolder;
Represents a physical folder in a file system. Use one of these to address specific paths (sub-trees) within the file system.

this(const(char)[] path, bool create = false);
Create a file folder with the given path.

Option 'create' will create the path when set true, or reference an existing path otherwise

final @property const(char)[] name();
Return a short name

final string toString();
Return a long name

final void verify(VfsFolder folder, bool mounting);
A folder is being added or removed from the hierarchy. Use this to test for validity (or whatever) and throw exceptions as necessary

Here we test for folder overlap, and bail-out when found.

final @property VfsFile file(const(char)[] name);
Return a contained file representation

final @property VfsFolderEntry folder(const(char)[] path);
Return a contained folder representation

final VfsFolder clear();
Remove the folder subtree. Use with care!

final @property bool writable();
Is folder writable?

final @property VfsFolders self();
Returns content information about this folder

final @property VfsFolders tree();
Returns a subtree of folders matching the given name

final int opApply(scope int delegate(ref VfsFolder) dg);
Iterate over the set of immediate child folders. This is useful for reflecting the hierarchy

VfsFolder close(bool commit = true);
Close and/or synchronize changes made to this folder. Each driver should take advantage of this as appropriate, perhaps combining multiple files together, or possibly copying to a remote location

class FileGroup: tango.io.vfs.model.Vfs.VfsFiles;
Represents a group of files (need this declared here to avoid a bunch of bizarre compiler warnings)

this(FolderGroup host, VfsFilter filter);


final int opApply(scope int delegate(ref VfsFile) dg);
Iterate over the set of contained VfsFile instances

final @property size_t files();
Return the total number of entries

final @property ulong bytes();
Return the total size of all files


Page generated by Ddoc. Copyright (c) 2007 Kris Bell. All rights reserved