コード例 #1
0
ファイル: filebrowser.cpp プロジェクト: neurodebian/iv-hines
boolean FBDirectory::LoadDirectory(const char* name) {
    char buf[max_filename_length+2];
    const char* path = buf;

    strcpy(buf, ValidDirectories(RealPath(name)));
    return Reset(buf);
}
コード例 #2
0
ファイル: direct.cpp プロジェクト: PNCG/neuron
bool Directory::LoadDirectory (const char* name) {
    char buf[MAX_PATH_LENGTH+2];
    const char* path = buf;

    strcpy(buf, ValidDirectories(RealPath(name)));
    return Reset(buf);
}
コード例 #3
0
ファイル: filebrowser.cpp プロジェクト: neurodebian/iv-hines
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;
}
コード例 #4
0
ファイル: filebrowser.cpp プロジェクト: neurodebian/iv-hines
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;
}