5 #include "bcwindowbase.inc"
19 int64_t calendar_time
);
22 int set_path(char *path
);
23 int set_name(char *name
);
32 int64_t calendar_time
;
38 // sets the working directory to the user
40 virtual ~FileSystem();
42 // Load the new directory and change current_dir to it.
43 // This does not complete the dir path.
44 int update(char *new_dir
= 0);
46 // Complete the path in the string and change to the directory in the string.
47 // Does not change new_dir
48 int change_dir(char *new_dir
);
49 // Set the current_dir to something without completing the path.
50 int set_current_dir(char *new_dir
);
53 char *get_current_dir();
54 // Syntax of filter is
55 // single filter without [].
56 // multiple filters enclosed in [].
57 int set_filter(char *new_filter
);
58 int set_show_all(); // show hidden files
59 int set_want_directory();
60 int set_sort_order(int value
);
61 int set_sort_field(int field
);
62 int create_dir(char *new_dir_
); // create a new directory
63 int complete_path(char *filename
); // use the filename and the current_dir to create a complete filename
64 int is_dir(const char *new_dir_
); // return 0 if the text is a directory
65 int extract_dir(char *out
, const char *in
); // extract the directory from the path
66 int extract_name(char *out
, const char *in
, int test_dir
= 1); // extract the name from the path
67 int join_names(char *out
, char *dir_in
, char *name_in
); // combine a directory and filename
68 long get_date(char *filename
); // get the date of the filename modification
69 static int64_t get_size(char *filename
); // Get the number of bytes in the file.
70 int add_end_slash(char *new_dir
);
72 FileItem
* get_entry(int entry
);
74 int parse_tildas(char *new_dir
); // expand tildas
75 int parse_directories(char *new_dir
); // add directories
76 int parse_dots(char *new_dir
); // move up directory tree after expanding tildas
78 // Array of files and directories in the directory pointed to by current_dir.
79 // Directories are first.
80 ArrayList
<FileItem
*> dir_list
;
82 // Sorting order and sorting field. These are identical in BC_ListBox.
89 // Match column definitions in BC_FileBox.
98 int compare_items(ArrayList
<FileItem
*> *dir_list
, int item1
, int item2
);
99 int sort_table(ArrayList
<FileItem
*> *dir_list
);
102 // Combine the directories and files into the master list, directories first.
103 int combine(ArrayList
<FileItem
*> *dir_list
, ArrayList
<FileItem
*> *file_list
);
104 // Return whether or not the string is the root directory.
105 int is_root_dir(char *path
);
106 // Whether or not the file passes the current filter.
107 int test_filter(FileItem
*file
);
108 int reset_parameters();
109 int delete_directory();
110 char filter
[BCTEXTLEN
]; // what filenames have to end in to get displayed
112 int show_all_files
; // shows . files
113 char current_dir
[BCTEXTLEN
];
114 char string
[BCTEXTLEN
], string2
[BCTEXTLEN
];