fSnapshot
if (fSnapshot != NULL)
fSnapshot->ReleaseReference();
DirectoryCacheSnapshot* fSnapshot;
if (cookie->fSnapshot == NULL) {
cookie->fSnapshot = new DirectoryCacheSnapshot(*snapshot);
if (cookie->fSnapshot == NULL)
MutexLocker _(cookie->fSnapshot->fLock);
cookie->fCurrent = cookie->fSnapshot->fEntries.Head();
= cookie->fSnapshot->fEntries.GetNext(cookie->fCurrent);
cookie->fSnapshot = NULL;
cookie->fSnapshot = NULL;
if (cookie->fSnapshot != NULL)
cookie->fSnapshot->ReleaseReference();
cookie->fSnapshot = NULL;
if (fSnapshot == NULL)
if (startInfo == NULL || startInfo == fSnapshot->rootDir) {
VolumeSnapshot* previousSnapshot = fSnapshot;
fSnapshot = new VolumeSnapshot(fVolume);
stringScan.ReplaceFirst("%refName%", fSnapshot->name.c_str());
fVolumeBytesInUse = fSnapshot->capacity - fSnapshot->freeBytes;
fSnapshot->rootDir = _GetFileInfo(&root, NULL);
if (fSnapshot->rootDir == NULL) {
delete fSnapshot;
fSnapshot = previousSnapshot;
string.ReplaceFirst("%refName%", fSnapshot->name.c_str());
freeSpace->size = fSnapshot->freeBytes;
fSnapshot->freeSpace = freeSpace;
fSnapshot->currentDir = NULL;
off_t previousVolumeCapacity = fSnapshot->capacity;
off_t previousVolumeFreeBytes = fSnapshot->freeBytes;
fSnapshot->capacity = fVolume->Capacity();
fSnapshot->freeBytes = fVolume->FreeBytes();
fVolumeBytesInUse = fSnapshot->capacity - fSnapshot->freeBytes;
fSnapshot->capacity = previousVolumeCapacity;
fSnapshot->freeBytes = previousVolumeFreeBytes;
FileInfo* checkDir = fSnapshot->rootDir;
if (prefDir == fSnapshot->rootDir)
fSnapshot(NULL),
delete fSnapshot;
if (fSnapshot != NULL && fSnapshot->currentDir != NULL)
fSnapshot->currentDir->GetPath(fDesiredPath);
{ return fBusy ? NULL : fSnapshot; }
{ return fBusy ? NULL : fSnapshot->currentDir; }
{ fSnapshot->currentDir = info; }
VolumeSnapshot* fSnapshot;