X-Git-Url: http://ecere.com/cgi-bin/gitweb.cgi?p=ede;a=blobdiff_plain;f=libede%2Fsrc%2FFileSystemCache.ec;fp=libede%2Fsrc%2FFileSystemCache.ec;h=89eeaa1693e87ad38c0ae61b6691185455972981;hp=03920bdeae4baf781828ae8dce139dff96161f70;hb=bc25e0084823e36a8403b14a96985459328cbe3c;hpb=021f46f0de53d6b80a14654f06ec96442fb2e638 diff --git a/libede/src/FileSystemCache.ec b/libede/src/FileSystemCache.ec index 03920bd..89eeaa1 100644 --- a/libede/src/FileSystemCache.ec +++ b/libede/src/FileSystemCache.ec @@ -132,16 +132,16 @@ public: 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 @@ -163,20 +163,22 @@ public: } 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++) { @@ -185,10 +187,10 @@ public: PrintLn(p); } PrintLn(path); - PrintLn("bad"); } delete p; #endif + /* if(dev && inode && cache.bits.indexInodes) { FileSystemDeviceCache devCache = cache.deviceCaches[dev]; @@ -203,17 +205,18 @@ public: 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(); @@ -310,8 +313,11 @@ public: void Special(char * path/*, Map linksPaths*//*Map> 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; @@ -353,6 +359,7 @@ public: } else PrintLn("no dev/inode"); + */ return true; } }; @@ -455,12 +462,12 @@ private: } } -Array GetPathDirNamesArray(char * path) +Array GetPathDirNamesArray(const char * path) { Array names; if(path && path[0]) { - char * p = path; + const char * p = path; char rest[MAX_LOCATION]; char name[MAX_FILENAME]; names = { };