#include <filesystem.h>

Public Types | |
| enum | { SORT_ASCENDING, SORT_DESCENDING } |
| enum | { SORT_PATH, SORT_SIZE, SORT_DATE, SORT_EXTENSION } |
Public Member Functions | |
| FileSystem () | |
| virtual | ~FileSystem () |
| int | update (char *new_dir=0) |
| int | change_dir (char *new_dir) |
| int | set_current_dir (char *new_dir) |
| int | move_up () |
| char * | get_current_dir () |
| int | set_filter (char *new_filter) |
| int | set_show_all () |
| int | set_want_directory () |
| int | set_sort_order (int value) |
| int | set_sort_field (int field) |
| int | create_dir (char *new_dir_) |
| int | complete_path (char *filename) |
| int | is_dir (const char *new_dir_) |
| int | extract_dir (char *out, const char *in) |
| int | extract_name (char *out, const char *in, int test_dir=1) |
| int | join_names (char *out, char *dir_in, char *name_in) |
| int | add_end_slash (char *new_dir) |
| int | total_files () |
| FileItem * | get_entry (int entry) |
| int | parse_tildas (char *new_dir) |
| int | parse_directories (char *new_dir) |
| int | parse_dots (char *new_dir) |
| void | alphabetize () |
Static Public Member Functions | |
| static int64_t | get_date (char *filename) |
| static int64_t | get_size (char *filename) |
Data Fields | |
| ArrayList< FileItem * > | dir_list |
Private Member Functions | |
| int | dot_reverse_filename (char *out, const char *in) |
| int | compare_items (ArrayList< FileItem * > *dir_list, int item1, int item2) |
| int | sort_table (ArrayList< FileItem * > *dir_list) |
| int | combine (ArrayList< FileItem * > *dir_list, ArrayList< FileItem * > *file_list) |
| int | is_root_dir (char *path) |
| int | test_filter (FileItem *file) |
| int | reset_parameters () |
| int | delete_directory () |
Private Attributes | |
| char | filter [BCTEXTLEN] |
| int | want_directory |
| int | show_all_files |
| char | current_dir [BCTEXTLEN] |
| char | string [BCTEXTLEN] |
| char | string2 [BCTEXTLEN] |
| int | sort_order |
| int | sort_field |
Definition at line 35 of file filesystem.h.
| anonymous enum |
| anonymous enum |
Definition at line 96 of file filesystem.h.
| FileSystem::FileSystem | ( | ) |
Definition at line 80 of file filesystem.C.
References BCTEXTLEN, current_dir, and reset_parameters().

| FileSystem::~FileSystem | ( | ) | [virtual] |
Definition at line 87 of file filesystem.C.
References delete_directory().

| int FileSystem::update | ( | char * | new_dir = 0 |
) |
Definition at line 372 of file filesystem.C.
References ArrayList< TYPE >::append(), BCTEXTLEN, FileItem::calendar_time, combine(), current_dir, FileItem::day, delete_directory(), files, FileItem::is_dir, is_root_dir(), FileItem::month, ArrayList< TYPE >::remove_all(), FileItem::set_name(), FileItem::set_path(), show_all_files, FileItem::size, test_filter(), want_directory, and FileItem::year.
Referenced by BC_FileBox::BC_FileBox(), change_dir(), MWindow::clean_indexes(), BC_FileBox::create_objects(), BC_FileBox::create_tables(), MWindow::init_plugins(), DeleteAllIndexes::run(), and BC_FileBox::update_filter().

| int FileSystem::change_dir | ( | char * | new_dir | ) |
Definition at line 733 of file filesystem.C.
References BCTEXTLEN, complete_path(), and update().
Referenced by BC_FileBoxDirectoryText::handle_event(), BC_FileBox::submit_dir(), and BC_FileBox::submit_file().

| int FileSystem::set_current_dir | ( | char * | new_dir | ) |
Definition at line 748 of file filesystem.C.
References current_dir.
Referenced by Edits::load_edit(), and Asset::read().
| int FileSystem::move_up | ( | ) |
| char * FileSystem::get_current_dir | ( | ) |
Definition at line 760 of file filesystem.C.
References current_dir.
Referenced by BC_FileBox::BC_FileBox(), BC_FileBoxDirectoryText::handle_event(), BC_NewFolderThread::run(), BC_FileBox::submit_dir(), and BC_FileBox::submit_file().
| int FileSystem::set_filter | ( | char * | new_filter | ) |
Definition at line 467 of file filesystem.C.
References filter.
Referenced by MWindow::clean_indexes(), BC_FileBox::create_objects(), MWindow::init_plugins(), and BC_FileBox::update_filter().
| int FileSystem::set_show_all | ( | ) |
Definition at line 473 of file filesystem.C.
References show_all_files.
Referenced by BC_FileBox::BC_FileBox().
| int FileSystem::set_want_directory | ( | ) |
| int FileSystem::set_sort_order | ( | int | value | ) |
Definition at line 113 of file filesystem.C.
References sort_order.
Referenced by BC_FileBox::create_tables().
| int FileSystem::set_sort_field | ( | int | field | ) |
Definition at line 118 of file filesystem.C.
References sort_field.
Referenced by BC_FileBox::create_tables().
| int FileSystem::create_dir | ( | char * | new_dir_ | ) |
Definition at line 500 of file filesystem.C.
References BCTEXTLEN, and complete_path().
Referenced by MWindow::create_defaults_path().

| int FileSystem::complete_path | ( | char * | filename | ) |
Definition at line 647 of file filesystem.C.
References parse_directories(), parse_dots(), and parse_tildas().
Referenced by BC_FileBox::BC_FileBox(), change_dir(), MWindow::clean_indexes(), Preferences::copy_from(), MWindow::create_defaults_path(), create_dir(), BatchRenderThread::create_path(), extract_dir(), LoadBackup::handle_event(), MWindow::init_plugin_path(), is_dir(), TitleMain::load_defaults(), main(), Preferences::Preferences(), ChannelDB::prefix_to_path(), Render::render(), DeleteAllIndexes::run(), MWindow::save_backup(), TitleMain::save_defaults(), BC_FileBoxListBox::selection_changed(), and BC_FileBox::submit_file().

| int FileSystem::is_dir | ( | const char * | new_dir_ | ) |
Definition at line 485 of file filesystem.C.
References BCTEXTLEN, and complete_path().
Referenced by MWindow::clean_indexes(), MWindow::create_defaults_path(), BC_FileBox::delete_files(), extract_dir(), extract_name(), BC_FileBoxDirectoryText::handle_event(), MWindow::init_plugin_path(), and BC_FileBox::submit_file().

| int FileSystem::extract_dir | ( | char * | out, | |
| const char * | in | |||
| ) |
Definition at line 662 of file filesystem.C.
References complete_path(), and is_dir().
Referenced by BC_FileBox::BC_FileBox(), Edit::copy(), Edits::load_edit(), Asset::read(), BC_FileBoxListBox::selection_changed(), BC_FileBox::submit_file(), and Asset::write().

| int FileSystem::extract_name | ( | char * | out, | |
| const char * | in, | |||
| int | test_dir = 1 | |||
| ) |
Definition at line 681 of file filesystem.C.
References is_dir().
Referenced by ReverbMenu::add_load(), MainMenu::add_load(), MWindow::asset_to_edl(), BC_FileBox::BC_FileBox(), VWindow::change_source(), Edit::copy(), AssetPicon::create_objects(), ResourcePixmap::draw_title(), MainMenu::init_loads(), ReverbMenu::load_defaults(), MWindow::load_filenames(), ThreadIndexer::run(), BC_FileBoxListBox::selection_changed(), MWindow::set_filename(), Render::start_progress(), BC_FileBox::submit_file(), VWindowGUI::update_sources(), MWindowGUI::update_title(), and Asset::write().

| int FileSystem::join_names | ( | char * | out, | |
| char * | dir_in, | |||
| char * | name_in | |||
| ) |
Definition at line 699 of file filesystem.C.
Referenced by MWindow::clean_indexes(), IndexFile::get_index_filename(), BC_FileBox::get_path(), Edits::load_edit(), ChannelDB::prefix_to_path(), Asset::read(), BC_NewFolderThread::run(), and BC_FileBox::submit_dir().
| int64_t FileSystem::get_date | ( | char * | filename | ) | [static] |
Definition at line 717 of file filesystem.C.
Referenced by MWindow::clean_indexes(), and IndexFile::open_file().
| int64_t FileSystem::get_size | ( | char * | filename | ) | [static] |
Definition at line 725 of file filesystem.C.
Referenced by AssetEditWindow::create_objects(), FileMPEG::get_index(), IndexFile::open_file(), and IndexFile::open_source().
| int FileSystem::add_end_slash | ( | char * | new_dir | ) |
| int FileSystem::total_files | ( | ) |
Definition at line 765 of file filesystem.C.
References dir_list, and ArrayList< TYPE >::total.
Referenced by BC_FileBox::create_tables(), and MWindow::init_plugins().
| FileItem * FileSystem::get_entry | ( | int | entry | ) |
Definition at line 771 of file filesystem.C.
References dir_list, and ArrayList< TYPE >::values.
Referenced by BC_FileBox::create_tables().
| int FileSystem::parse_tildas | ( | char * | new_dir | ) |
Definition at line 510 of file filesystem.C.
References BCTEXTLEN.
Referenced by BC_Hash::BC_Hash(), and complete_path().
| int FileSystem::parse_directories | ( | char * | new_dir | ) |
Definition at line 562 of file filesystem.C.
References BCTEXTLEN, current_dir, and is_root_dir().
Referenced by complete_path().

| int FileSystem::parse_dots | ( | char * | new_dir | ) |
| void FileSystem::alphabetize | ( | ) |
Definition at line 240 of file filesystem.C.
References dir_list, and sort_table().

| int FileSystem::dot_reverse_filename | ( | char * | out, | |
| const char * | in | |||
| ) | [private] |
| int FileSystem::compare_items | ( | ArrayList< FileItem * > * | dir_list, | |
| int | item1, | |||
| int | item2 | |||
| ) | [private] |
Definition at line 149 of file filesystem.C.
References BCTEXTLEN, FileItem::calendar_time, dot_reverse_filename(), FileItem::is_dir, FileItem::name, FileItem::size, SORT_ASCENDING, SORT_DATE, SORT_EXTENSION, sort_field, sort_order, SORT_PATH, SORT_SIZE, and ArrayList< TYPE >::values.
Referenced by sort_table().

Definition at line 196 of file filesystem.C.
References compare_items(), ArrayList< TYPE >::total, and ArrayList< TYPE >::values.
Referenced by alphabetize(), and combine().

| int FileSystem::combine | ( | ArrayList< FileItem * > * | dir_list, | |
| ArrayList< FileItem * > * | file_list | |||
| ) | [private] |
Definition at line 221 of file filesystem.C.
References ArrayList< TYPE >::append(), sort_table(), ArrayList< TYPE >::total, and ArrayList< TYPE >::values.
Referenced by update().

| int FileSystem::is_root_dir | ( | char * | path | ) | [private] |
Definition at line 245 of file filesystem.C.
References current_dir.
Referenced by parse_directories(), and update().
| int FileSystem::test_filter | ( | FileItem * | file | ) | [private] |
Definition at line 251 of file filesystem.C.
References BC_WindowBase::done, filter, FileItem::is_dir, FileItem::name, strchr, string, and string2.
Referenced by update().
| int FileSystem::reset_parameters | ( | ) | [private] |
Definition at line 92 of file filesystem.C.
References current_dir, filter, show_all_files, SORT_ASCENDING, sort_field, sort_order, SORT_PATH, and want_directory.
Referenced by FileSystem().
| int FileSystem::delete_directory | ( | ) | [private] |
Definition at line 103 of file filesystem.C.
References dir_list, ArrayList< TYPE >::remove_all(), ArrayList< TYPE >::total, and ArrayList< TYPE >::values.
Referenced by update(), and ~FileSystem().

Definition at line 86 of file filesystem.h.
Referenced by alphabetize(), MWindow::clean_indexes(), delete_directory(), get_entry(), MWindow::init_plugin_path(), DeleteAllIndexes::run(), and total_files().
char FileSystem::filter[BCTEXTLEN] [private] |
Definition at line 118 of file filesystem.h.
Referenced by reset_parameters(), set_filter(), and test_filter().
int FileSystem::want_directory [private] |
Definition at line 119 of file filesystem.h.
Referenced by reset_parameters(), set_want_directory(), and update().
int FileSystem::show_all_files [private] |
Definition at line 120 of file filesystem.h.
Referenced by reset_parameters(), set_show_all(), and update().
char FileSystem::current_dir[BCTEXTLEN] [private] |
Definition at line 121 of file filesystem.h.
Referenced by FileSystem(), get_current_dir(), is_root_dir(), parse_directories(), reset_parameters(), set_current_dir(), and update().
char FileSystem::string[BCTEXTLEN] [private] |
char FileSystem::string2[BCTEXTLEN] [private] |
int FileSystem::sort_order [private] |
Definition at line 123 of file filesystem.h.
Referenced by compare_items(), reset_parameters(), and set_sort_order().
int FileSystem::sort_field [private] |
Definition at line 124 of file filesystem.h.
Referenced by compare_items(), reset_parameters(), and set_sort_field().
1.5.5