ArchiveDirectory

Base class for archive directories. Provides common subdirectory and file management.

Constructors

this
this()

Default constructor for ArchiveDirectories. Used to create the root archive. Note: Do not use without a subsequent call to *at least* .path = "path".

this
this(string mypath)
this(string[] parts)

Constructs a new ArchiveDirectory with the given path name.

Members

Aliases

Directory
alias Directory = Policy.DirectoryImpl

Alias for referencing the correct Directory class in the Policy.

File
alias File = Policy.FileImpl

Alias for referencing the correct File class in the Policy.

Functions

addDirectory
Directory addDirectory(string[] pathParts, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
addFile
void addFile(string[] pathParts, File file, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
directoriesOpApply
int directoriesOpApply(int delegate(ref Directory) dg)

opApply method used for directory iteration.

filesOpApply
int filesOpApply(int delegate(ref File) dg)

opApply method used for file iteration.

getDirectory
Directory getDirectory(string[] pathParts, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
getFile
File getFile(string[] pathParts, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
membersOpApply
int membersOpApply(int delegate(ref ArchiveMember) dg)

opApply method for member iteration.

numDirectories
size_t numDirectories(size_t n, size_t cur)
Undocumented in source. Be warned that the author may not have intended to support it.
numFiles
size_t numFiles(size_t n, size_t cur)
Undocumented in source. Be warned that the author may not have intended to support it.
numMembers
size_t numMembers(size_t n, size_t cur)
Undocumented in source. Be warned that the author may not have intended to support it.
removeDirectory
bool removeDirectory(string[] pathParts, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.
removeEmptyDirectories
uint removeEmptyDirectories()
Undocumented in source. Be warned that the author may not have intended to support it.
removeFile
bool removeFile(string[] pathParts, uint i)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

directories
Directory[string] directories;

Subdirectories in this directory. Allows access to directories during manual recursion of the Directory structure.

files
File[string] files;

Files in this directory. Allows access to files during manual recursion of the Directory structure.

Inherited Members

From ArchiveMember

_path
string _path;
Undocumented in source.
isDirectory
bool isDirectory [@property getter]
isFile
bool isFile [@property getter]
name
string name [@property getter]

Gets the final element in the path of this member. e.g. for the path "a/b/c/e/fg.txt" the result is "fg.txt"

name
string name [@property setter]

Sets the final element in the path of this member. e.g. for the path "a/b/c/e/fg.txt" the changed path part will be "fg.txt" Warning: Do not use this property while this member is currently part of an archive.

path
string path [@property getter]

Gets the path of this member.

path
string path [@property setter]

Sets the path of this member. Warning: Do not use this property while this member is currently part of an archive.

Meta