5 #include "bcwindowbase.inc"
19 longest calendar_time
);
22 int set_path(char *path
);
23 int set_name(char *name
);
32 longest calendar_time
;
38 FileSystem(); // sets the working directory to the user
39 virtual ~FileSystem();
41 // Load the new directory and change current_dir to it.
42 // This does not complete the dir path.
43 int update(char *new_dir
= 0);
45 // Complete the path in the string and change to the directory in the string.
46 // Does not change new_dir
47 int change_dir(char *new_dir
);
48 // Set the current_dir to something without completing the path.
49 int set_current_dir(char *new_dir
);
52 char *get_current_dir();
53 // Syntax of filter is
54 // single filter without [].
55 // multiple filters enclosed in [].
56 int set_filter(char *new_filter
);
57 int set_show_all(); // show hidden files
58 int set_want_directory();
59 int create_dir(char *new_dir_
); // create a new directory
60 int complete_path(char *filename
); // use the filename and the current_dir to create a complete filename
61 int is_dir(const char *new_dir_
); // return 0 if the text is a directory
62 int extract_dir(char *out
, const char *in
); // extract the directory from the path
63 int extract_name(char *out
, const char *in
, int test_dir
= 1); // extract the name from the path
64 int join_names(char *out
, char *dir_in
, char *name_in
); // combine a directory and filename
65 long get_date(char *filename
); // get the date of the filename modification
66 longest
get_size(char *filename
); // Get the number of bytes in the file.
67 int add_end_slash(char *new_dir
);
69 FileItem
* get_entry(int entry
);
71 int parse_tildas(char *new_dir
); // expand tildas
72 int parse_directories(char *new_dir
); // add directories
73 int parse_dots(char *new_dir
); // move up directory tree after expanding tildas
75 // Array of files and directories in the directory pointed to by current_dir.
76 // Directories are first.
77 ArrayList
<FileItem
*> dir_list
;
80 int sort(ArrayList
<FileItem
*> *dir_list
);
81 // Combine the directories and files into the master list, directories first.
82 int combine(ArrayList
<FileItem
*> *dir_list
, ArrayList
<FileItem
*> *file_list
);
83 // Return whether or not the string is the root directory.
84 int is_root_dir(char *path
);
85 // Whether or not the file passes the current filter.
86 int test_filter(FileItem
*file
);
87 int reset_parameters();
88 int delete_directory();
89 char filter
[BCTEXTLEN
]; // what filenames have to end in to get displayed
91 int show_all_files
; // shows . files
92 char current_dir
[BCTEXTLEN
];
93 char string
[BCTEXTLEN
], string2
[BCTEXTLEN
];