iterateStartPath = true;
// COMPILER TOFIX: this will not compile (error: method class must be derived from class) -- bool Whatever/*FileSystemCache*/::OnFolder(...)
- bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+ bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(const char * name, const char * path, FileStats stats, bool isRootObject)
{
bool result = true;
FileSystemCache cache = this.cache;
- uint dev = stats.dev;
- uint inode = stats.inode;
+ //uint dev = stats.dev;
+ //uint inode = stats.inode;
char * p;
FSCacheObject parent = isRootObject ? null : cache.normalParentStack.lastIterator.data;
FSCacheObject o { parent, name = CopyString(isRootObject ? path : name), stats = stats };
- FileStats s;
+ //FileStats s;
if(isRootObject)
{
// TODO see if we can find a parent for it
}
cache.objects.Add(o);
#if _DEBUG
+ /*
if(cache.objects.count % 1000 == 0)
PrintLn(path, " ----- ", cache.objects.count / 1000, " --------- ", dev);
- FileGetStatsLink(path, s);
+ */
+ //FileGetStatsLink(path, s);
+ /*
if(s.inode != inode)
{
PrintLn(s.inode);
PrintLn(inode);
- PrintLn("crap");
}
+ */
p = o.GetPath();
if(strcmp(p, path))
{
int c;
- PrintLn("damn");
PrintLn(p);
for(c = 0; c < cache.normalParentStack.count; c++)
{
PrintLn(p);
}
PrintLn(path);
- PrintLn("bad");
}
delete p;
#endif
+ /*
if(dev && inode && cache.bits.indexInodes)
{
FileSystemDeviceCache devCache = cache.deviceCaches[dev];
inodes.Add(o);
}
}
+ */
return result;
}
- void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(char * path)
+ void /*FileSystemCache*/DummyFileSystemCacheWindow::OnEnteringDirectory(const char * path)
{
FileSystemCache cache = this.cache;
FSCacheObject o = cache.objects.lastIterator.data;
cache.normalParentStack.Add(o);
}
- void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(char * path)
+ void /*FileSystemCache*/DummyFileSystemCacheWindow::OnLeavingDirectory(const char * path)
{
FileSystemCache cache = this.cache;
cache.normalParentStack.lastIterator.Remove();
void Special(char * path/*, Map<String, bool> linksPaths*//*Map<uint, Map<uint, bool>> devsInodesDone*/, DummyFileSystemCacheWindow dummyWindow)
{
FileSystemCacheIterator fsci { owner = dummyWindow, cache = this, iterateStartPath = true;
- bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(char * name, char * path, FileStats stats, bool isRootObject)
+ bool /*FileSystemCache*/DummyFileSystemCacheWindow::OnObject(const char * name, const char * path,
+ FileStats stats, bool isRootObject)
{
+ /*
+
uint dev = stats.dev;
uint inode = stats.inode;
FileSystemCache cache = this.cache;
}
else
PrintLn("no dev/inode");
+ */
return true;
}
};
}
}
-Array<String> GetPathDirNamesArray(char * path)
+Array<String> GetPathDirNamesArray(const char * path)
{
Array<String> names;
if(path && path[0])
{
- char * p = path;
+ const char * p = path;
char rest[MAX_LOCATION];
char name[MAX_FILENAME];
names = { };