FileSystem Class Reference

#include <filesystem.h>

Collaboration diagram for FileSystem:

Collaboration graph
[legend]

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 ()
FileItemget_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

Detailed Description

Definition at line 35 of file filesystem.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
SORT_ASCENDING 
SORT_DESCENDING 

Definition at line 89 of file filesystem.h.

anonymous enum

Enumerator:
SORT_PATH 
SORT_SIZE 
SORT_DATE 
SORT_EXTENSION 

Definition at line 96 of file filesystem.h.


Constructor & Destructor Documentation

FileSystem::FileSystem (  ) 

Definition at line 80 of file filesystem.C.

References BCTEXTLEN, current_dir, and reset_parameters().

Here is the call graph for this function:

FileSystem::~FileSystem (  )  [virtual]

Definition at line 87 of file filesystem.C.

References delete_directory().

Here is the call graph for this function:


Member Function Documentation

int FileSystem::update ( char *  new_dir = 0  ) 

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().

Here is the call graph for this function:

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 (  ) 

int FileSystem::set_filter ( char *  new_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 (  ) 

Definition at line 479 of file filesystem.C.

References 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().

Here is the call graph for this function:

int FileSystem::complete_path ( char *  filename  ) 

int FileSystem::is_dir ( const char *  new_dir_  ) 

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().

Here is the call graph for this function:

int FileSystem::extract_name ( char *  out,
const char *  in,
int  test_dir = 1 
)

int FileSystem::join_names ( char *  out,
char *  dir_in,
char *  name_in 
)

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]

int FileSystem::add_end_slash ( char *  new_dir  ) 

Definition at line 754 of file filesystem.C.

Referenced by Preferences::copy_from().

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().

Here is the call graph for this function:

int FileSystem::parse_dots ( char *  new_dir  ) 

Definition at line 596 of file filesystem.C.

Referenced by complete_path().

void FileSystem::alphabetize (  ) 

Definition at line 240 of file filesystem.C.

References dir_list, and sort_table().

Here is the call graph for this function:

int FileSystem::dot_reverse_filename ( char *  out,
const char *  in 
) [private]

Definition at line 127 of file filesystem.C.

Referenced by compare_items().

int FileSystem::compare_items ( ArrayList< FileItem * > *  dir_list,
int  item1,
int  item2 
) [private]

int FileSystem::sort_table ( ArrayList< FileItem * > *  dir_list  )  [private]

Definition at line 196 of file filesystem.C.

References compare_items(), ArrayList< TYPE >::total, and ArrayList< TYPE >::values.

Referenced by alphabetize(), and combine().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Field Documentation

char FileSystem::filter[BCTEXTLEN] [private]

Definition at line 118 of file filesystem.h.

Referenced by reset_parameters(), set_filter(), and test_filter().

Definition at line 119 of file filesystem.h.

Referenced by reset_parameters(), set_want_directory(), and update().

Definition at line 120 of file filesystem.h.

Referenced by reset_parameters(), set_show_all(), and update().

char FileSystem::current_dir[BCTEXTLEN] [private]

char FileSystem::string[BCTEXTLEN] [private]

Definition at line 122 of file filesystem.h.

Referenced by test_filter().

char FileSystem::string2[BCTEXTLEN] [private]

Definition at line 122 of file filesystem.h.

Referenced by test_filter().

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().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:25:39 2008 for Cinelerra by  doxygen 1.5.5