boolean FBDirectory::LoadDirectory(const char* name) { char buf[max_filename_length+2]; const char* path = buf; strcpy(buf, ValidDirectories(RealPath(name))); return Reset(buf); }
bool Directory::LoadDirectory (const char* name) { char buf[MAX_PATH_LENGTH+2]; const char* path = buf; strcpy(buf, ValidDirectories(RealPath(name))); return Reset(buf); }
void FileBrowser::Init(const char* d) { dir = new FBDirectory(d); lastpath = fb_strdup(ValidDirectories(Normalize(d))); regexp = nil; directory_regexp = nil; mode = 0; directory_mode = 0; }
boolean FileBrowser::SetDirectory(const char* path) { boolean successful = true; path = ValidDirectories(path); const char* normpath = Normalize(path); if (strcmp(normpath, lastpath) != 0) { char* newnormpath = fb_strdup(normpath); successful = dir->LoadDirectory(newnormpath); if (successful) { delete [] lastpath; lastpath = newnormpath; UpdateStrings(); } else { delete [] newnormpath; } } return successful; }