tango.io.vfs.ZipFolder

License:
BSD style:

Version:
The Great Namechange: February 2008


Initial release: December 2007

author:
Daniel Keep

class ZipSubFolder: tango.io.vfs.model.Vfs.VfsFolder, tango.io.vfs.model.Vfs.VfsSync;
This class represents a folder in an archive. In addition to supporting the sync operation, you can also use the archive member to get a reference to the underlying ZipFolder instance.

final @property const(char)[] name();


final string toString();


final @property VfsFile file(const(char)[] path);


final @property VfsFolderEntry folder(const(char)[] path);


final @property VfsFolders self();


final @property VfsFolders tree();


final int opApply(scope int delegate(ref VfsFolder) dg);


final VfsFolder clear();


final @property bool writable();


VfsFolder close(bool commit = true);
Closes this folder object. If commit is true, then the folder is sync'ed before being closed.

VfsFolder sync();
This will flush any changes to the archive to disk. Note that this applies to the entire archive, not just this folder and its contents.

final void verify(VfsFolder folder, bool mounting);


final @property ZipFolder archive();
Returns a reference to the underlying ZipFolder instance.

class ZipFolder: tango.io.vfs.ZipFolder.ZipSubFolder;
ZipFolder serves as the root object for all Zip archives in the VFS. Presently, it can only open archives on the local filesystem.

this(const(char)[] path, bool readonly = false);
Opens an archive from the local filesystem. If the readonly argument is specified as true, then modification of the archive will be explicitly disallowed.

final VfsFolder close(bool commit = true);
Closes the archive, and releases all internal resources. If the commit argument is true (the default), then changes to the archive will be flushed out to disk. If false, changes will simply be discarded.

final VfsFolder sync();
Flushes all changes to the archive out to disk.

final @property bool readonly();
Indicates whether the archive was opened for read-only access. Note that in addition to the readonly constructor flag, this is also influenced by whether the file itself is read-only or not.

final @property const(char)[] path();
final @property const(char)[] path(const(char)[] v);
Allows you to read and specify the path to the archive. The effect of setting this is to change where the archive will be written to when flushed to disk.

class ZipFile: tango.io.vfs.model.Vfs.VfsFile;
This class represents a file within an archive.

final @property const(char)[] name();


final string toString();


final @property bool exists();


final @property ulong size();


final VfsFile copy(VfsFile source);


final VfsFile move(VfsFile source);


final VfsFile create();


final VfsFile create(InputStream stream);


final VfsFile remove();


final @property InputStream input();


final @property OutputStream output();


final @property VfsFile dup();


final @property Time modified();



Page generated by Ddoc. Copyright © 2007 Daniel Keep. All rights reserved.