projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework findobject, add opecv_build
[goodguy/history.git]
/
cinelerra-5.1
/
guicast
/
filesystem.h
diff --git
a/cinelerra-5.1/guicast/filesystem.h
b/cinelerra-5.1/guicast/filesystem.h
index 40a0b7f688b6f7127c2806e20d3e91147708d107..7226c11ea91c8fe547619a91843f89a0ee3484a7 100644
(file)
--- a/
cinelerra-5.1/guicast/filesystem.h
+++ b/
cinelerra-5.1/guicast/filesystem.h
@@
-30,22
+30,18
@@
class FileItem
{
public:
FileItem();
{
public:
FileItem();
- FileItem(char *path,
- char *name,
- int is_dir,
- int64_t size,
- int month,
- int day,
- int year,
- int64_t calendar_time);
+ FileItem(char *path, char *name, int is_dir,
+ int64_t size, int month, int day, int year,
+ int64_t calendar_time, int item_no=-1);
~FileItem();
int set_path(char *path);
int set_name(char *name);
int reset();
~FileItem();
int set_path(char *path);
int set_name(char *name);
int reset();
- const char* get_path();
- const char* get_name();
- int get_is_dir();
+
+ const char *get_path() { return path; }
+ const char *get_name() { return name; }
+ int get_is_dir() { return is_dir; }
char *path;
char *name;
char *path;
char *name;
@@
-55,6
+51,7
@@
public:
int day;
int year;
int64_t calendar_time;
int day;
int year;
int64_t calendar_time;
+ int item_no;
};
class FileSystem
};
class FileSystem
@@
-67,7
+64,9
@@
public:
// Load the new directory and change current_dir to it.
// This does not complete the dir path.
// If any of the files failed to stat, it returns nonzero.
// Load the new directory and change current_dir to it.
// This does not complete the dir path.
// If any of the files failed to stat, it returns nonzero.
+ int scan_directory(const char*);
int update(const char *new_dir = 0);
int update(const char *new_dir = 0);
+ int update_sort();
// Complete the path in the string and change to the directory in the string.
// Does not change new_dir
// Complete the path in the string and change to the directory in the string.
// Does not change new_dir
@@
-77,7
+76,6
@@
public:
int set_current_dir(const char *new_dir);
int move_up();
int set_current_dir(const char *new_dir);
int move_up();
- char *get_current_dir();
// Syntax of filter is
// single filter without [].
// multiple filters enclosed in [].
// Syntax of filter is
// single filter without [].
// multiple filters enclosed in [].
@@
-97,22
+95,19
@@
public:
static void set_date(const char *path, int64_t value); // set the date of the file
static int64_t get_size(char *filename); // Get the number of bytes in the file.
int add_end_slash(char *new_dir);
static void set_date(const char *path, int64_t value); // set the date of the file
static int64_t get_size(char *filename); // Get the number of bytes in the file.
int add_end_slash(char *new_dir);
- int total_files();
- FileItem* get_entry(int entry);
- int number_of(FileItem *item);
int parse_tildas(char *new_dir); // expand tildas
int parse_directories(char *new_dir); // add directories
int parse_dots(char *new_dir); // move up directory tree after expanding tildas
static char *basepath(const char *path); // collapse ".", "..", "//" elements
int parse_tildas(char *new_dir); // expand tildas
int parse_directories(char *new_dir); // add directories
int parse_dots(char *new_dir); // move up directory tree after expanding tildas
static char *basepath(const char *path); // collapse ".", "..", "//" elements
-// Alphabetize all the directories and files. By default
-// directories come first.
- void alphabetize();
-
// Array of files and directories in the directory pointed to by current_dir.
// Directories are first.
ArrayList<FileItem*> dir_list;
// Array of files and directories in the directory pointed to by current_dir.
// Directories are first.
ArrayList<FileItem*> dir_list;
+ char *get_current_dir() { return current_dir; }
+ FileItem* get_entry(int entry) { return dir_list.values[entry]; }
+ int total_files() { return dir_list.total; }
+ void alphabetize() { sort_table(&dir_list); }
// Sorting order and sorting field. These are identical in BC_ListBox.
enum
// Sorting order and sorting field. These are identical in BC_ListBox.
enum
@@
-144,8
+139,6
@@
private:
// Combine the directories and files into the master list, directories first.
int combine(ArrayList<FileItem*> *dir_list, ArrayList<FileItem*> *file_list);
// Combine the directories and files into the master list, directories first.
int combine(ArrayList<FileItem*> *dir_list, ArrayList<FileItem*> *file_list);
-// Return whether or not the string is the root directory.
- int is_root_dir(char *path);
// Whether or not the file passes the current filter.
int test_filter(FileItem *file);
int reset_parameters();
// Whether or not the file passes the current filter.
int test_filter(FileItem *file);
int reset_parameters();