Dir

Dir.

Constructors

this
this(Dir parent, GStats gstats)

Construct File System Root Directory.

this
this(string rootPath, GStats gstats)
Undocumented in source.
this
this(DirEntry dent, Dir parent, GStats gstats)
Undocumented in source.
this
this(string name, Dir parent, Bytes64 size, SysTime timeLastModified, SysTime timeLastAccessed, GStats gstats)
Undocumented in source.
this
this(Unpacker unpacker)

Construct from msgpack unpacker.

Members

Aliases

sync
alias sync = reload
Undocumented in source.

Functions

accept
void accept(Cereal cereal)
Undocumented in source. Be warned that the author may not have intended to support it.
addTreeStatsFromSub
void addTreeStatsFromSub(NotNull!F subFile, DirEntry subDent)

Append Tree Statistics.

depth
int depth()
face
Face!Color face()
Undocumented in source. Be warned that the author may not have intended to support it.
find
File find(string name)

Scan this recursively for a non-diretory file with basename name. TODO: Reuse range based algorithm this.tree(depthFirst|breadFirst)

fromMsgpack
void fromMsgpack(Unpacker unpacker)
Undocumented in source. Be warned that the author may not have intended to support it.
gstats
GStats gstats(GStats gstats)
Undocumented in source. Be warned that the author may not have intended to support it.
gstats
GStats gstats()
Undocumented in source. Be warned that the author may not have intended to support it.
isRoot
bool isRoot()

Return true if this is a file system root directory.

load
bool load(int depth, bool force)

Load Contents of this Directory from Disk using DirEntries.

makeObselete
void makeObselete()
Undocumented in source. Be warned that the author may not have intended to support it.
makeUnObselete
void makeUnObselete()
Undocumented in source. Be warned that the author may not have intended to support it.
reload
bool reload(int depth)
Undocumented in source. Be warned that the author may not have intended to support it.
sub
File sub(Name sub_name)
Undocumented in source. Be warned that the author may not have intended to support it.
sub
File sub(File sub)
Undocumented in source. Be warned that the author may not have intended to support it.
subs
NotNull!File[string] subs()
Undocumented in source. Be warned that the author may not have intended to support it.
subsSorted
NotNull!File[] subsSorted(DirSorting sorted)
Undocumented in source. Be warned that the author may not have intended to support it.
toMsgpack
void toMsgpack(Packer packer)
Undocumented in source. Be warned that the author may not have intended to support it.
toTextual
string toTextual()
Undocumented in source. Be warned that the author may not have intended to support it.
treeContentId
const(SHA1Digest) treeContentId()
treeSize
Bytes64 treeSize()
Undocumented in source. Be warned that the author may not have intended to support it.
updateStats
void updateStats(NotNull!F subFile, DirEntry subDent, bool isRegFile)

Update Statistics for Sub-File sub with subDent of this Dir.

Variables

_gstats
GStats _gstats;
Undocumented in source.
_timeAccessedInterval
Interval!SysTime _timeAccessedInterval;
Undocumented in source.
_timeModifiedInterval
Interval!SysTime _timeModifiedInterval;
Undocumented in source.
_treeContentId
SHA1Digest _treeContentId;
Undocumented in source.
_treeSize
Nullable!(size_t, size_t.max) _treeSize;
Undocumented in source.
hitCount
uint64_t hitCount;
Undocumented in source.
kind
DirKind kind;
Undocumented in source.

Inherited Members

From File

realExtension
string realExtension()
Undocumented in source. Be warned that the author may not have intended to support it.
ext
alias ext = realExtension
Undocumented in source.
toTextual
string toTextual()
Undocumented in source. Be warned that the author may not have intended to support it.
treeSize
Bytes64 treeSize()
Undocumented in source. Be warned that the author may not have intended to support it.
treeContentId
const(SHA1Digest) treeContentId()

Content Digest of Tree under this Directory.

face
Face!Color face()
Undocumented in source. Be warned that the author may not have intended to support it.
checkObseleted
bool checkObseleted(DirEntry dent)

Check if this File has been invalidated by dent.

makeObselete
void makeObselete()
Undocumented in source. Be warned that the author may not have intended to support it.
makeUnObselete
void makeUnObselete()
Undocumented in source. Be warned that the author may not have intended to support it.
depth
int depth()
depthIterative
int depthIterative()

NOTE: Currently not used.

parentsUpwards
Dir[] parentsUpwards()

Get Parenting Dirs starting from parent of this upto root. Make this even more lazily evaluted.

dirsDownward
alias dirsDownward = parentsUpwards
Undocumented in source.
parents
auto parents()

Get Parenting Dirs starting from file system root downto containing directory of this.

dirs
alias dirs = parents
Undocumented in source.
parentsDownward
alias parentsDownward = parents
Undocumented in source.
underAnyDir
bool underAnyDir()
Undocumented in source. Be warned that the author may not have intended to support it.
path
string path()
pathRecursive
string pathRecursive()
toMsgpack
void toMsgpack(Packer packer)
Undocumented in source. Be warned that the author may not have intended to support it.
fromMsgpack
void fromMsgpack(Unpacker unpacker)
Undocumented in source. Be warned that the author may not have intended to support it.
parent
Dir parent;
Undocumented in source.
dir
alias dir = parent
Undocumented in source.
name
string name;
Undocumented in source.
size
Bytes64 size;
Undocumented in source.
timeLastModified
SysTime timeLastModified;
Undocumented in source.
timeLastAccessed
SysTime timeLastAccessed;
Undocumented in source.

Meta