static bool isUnderVersionControl(const ResourcePtr& res) { #if 0 Stream* stream = StreamCreateFromFile( AllocatorGetHeap(), res->getPath() ); /*, StreamMode::Read );*/ const String& fullPath = PathGetCurrentDir() + PathGetSeparator() + PathGetBase( FileGetFullPath(&file) ) + PathGetSeparator() + ".svn"; FileClose(&file); return wxFileName::DirExists(fullPath); #endif return false; }
static String getResourceFullPath(const ResourcePtr& res) { const String& path = res->getPath(); const String& fullPath = PathGetCurrentDir() + PathGetSeparator() + path; return fullPath; }
void ArchiveMountDirectories(Archive* archive, const String& dirPath, Allocator* alloc) { Archive* dir = ArchiveCreateFromDirectory(alloc, dirPath); ArchiveMount(archive, dir, ""); std::vector<String> dirs; ArchiveEnumerateDirectories(dir, dirs); for(size_t i = 0; i < dirs.size(); i++) { const String& path = dirPath + PathGetSeparator() + dirs[i]; Archive* ndir = ArchiveCreateFromDirectory(alloc, path); ArchiveMount(archive, ndir, ""); } }