File System Access
[CORELIB]

Collaboration diagram for File System Access:


Classes

class  CFileException
 CFileException --. More...
class  CFileErrnoException
class  CFileAPI
 Global settings related to the file API. More...
class  CDirEntry
 CDirEntry --. More...
class  CFile
 CFile --. More...
class  CDir
 CDir --. More...
class  CSymLink
 CSymLink --. More...
class  CFileUtil
 CFileUtil --. More...
class  CFileDeleteList
 CFileDeleteList --. More...
class  CFileDeleteAtExit
 CFileDeleteAtExit --. More...
class  CTmpFile
 CTmpFile --. More...
class  CMemoryFile_Base
 CMemoryFile_Base --. More...
class  CMemoryFileSegment
 CMemoryFileSegment --. More...
class  CMemoryFileMap
 CMemoryFileMap --. More...
class  CMemoryFile
 CMemoryFile --. More...
class  CFindFileNamesFunc< TNames >
 Functor for generic FindFiles, adds file name to the specified container. More...
class  CFileIO_Base
 Base class for CFileIO, CFileReader, CFileWriter, CFileReaderWriter. More...
class  CFileIO
 Class for suppport low level input/output for files. More...
class  CFileReaderWriter_Base
 File based IReader/IWriter/IReaderWriter with low level IO for speed. More...
class  CFileReader
class  CFileWriter
class  CFileReaderWriter
class  CFileLock
 File locking. More...

Defines

#define FILENAME_MAX   256
#define PATH_MAX   FILENAME_MAX

Typedefs

typedef int TFileHandle
typedef CErrnoTemplException<
CFileException
CFileErrnoException_Base
typedef int TFindFiles
 Bitwise OR of "EFindFiles".

Enumerations

enum  EFindFiles {
  fFF_File = (1<<0), fFF_Dir = (1<<1), fFF_Recursive = (1<<2), fFF_Nocase = (1<<3),
  fFF_Default = fFF_File | fFF_Dir
}
 File finding flags. More...

Functions

template<class TFindFunc>
TFindFunc FindFilesInDir (const CDir &dir, const vector< string > &masks, const vector< string > &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)
 Find files in the specified directory.
template<class TFindFunc>
TFindFunc FindFilesInDir (const CDir &dir, const CMask &masks, const CMask &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)
 Find files in the specified directory.
template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles (TPathIterator path_begin, TPathIterator path_end, const vector< string > &masks, TFindFunc &find_func, TFindFiles flags=fFF_Default)
 Generic algorithm for file search.
template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles2 (TPathIterator path_begin, TPathIterator path_end, const vector< string > &masks, const vector< string > &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)
template<class TPathIterator, class TMaskIterator, class TFindFunc>
TFindFunc FindFiles (TPathIterator path_begin, TPathIterator path_end, TMaskIterator mask_begin, TMaskIterator mask_end, TFindFunc &find_func, TFindFiles flags=fFF_Default)
 Generic algorithm for file search.
template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles (TPathIterator path_begin, TPathIterator path_end, const CMask &masks, TFindFunc &find_func, TFindFiles flags=fFF_Default)
 Generic algorithm for file search.
template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles2 (TPathIterator path_begin, TPathIterator path_end, const CMask &masks, const CMask &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)
template<class TContainer, class TPathIterator>
void FindFiles (TContainer &out, TPathIterator first_path, TPathIterator last_path, const vector< string > &masks, TFindFiles flags=fFF_Default)
 Utility algorithm scans the provided directories using iterators finds files to match the masks and stores all found files in the container object.
template<class TContainer, class TPathIterator>
void FindFiles2 (TContainer &out, TPathIterator first_path, TPathIterator last_path, const vector< string > &masks, const vector< string > &masks_subdir, TFindFiles flags=fFF_Default)
template<class TContainer, class TPathIterator>
void FindFiles (TContainer &out, TPathIterator first_path, TPathIterator last_path, const CMask &masks, TFindFiles flags=fFF_Default)
 Utility algorithm scans the provided directories using iterators finds files to match the masks and stores all found files in the container object.
template<class TContainer, class TPathIterator>
void FindFiles2 (TContainer &out, TPathIterator first_path, TPathIterator last_path, const CMask &masks, const CMask &masks_subdir, TFindFiles flags=fFF_Default)
template<class TContainer, class TPathIterator, class TMaskIterator>
void FindFiles (TContainer &out, TPathIterator first_path, TPathIterator last_path, TMaskIterator first_mask, TMaskIterator last_mask, TFindFiles flags=fFF_Default)
 Utility algorithm scans the provided directories using iterators finds files to match the masks and stores all found files in the container object.
void FindFiles (const string &pattern, list< string > &result, TFindFiles flags)
 Utility function working like glob(): takes a pattern and fills the result list with files/directories matching the pattern.

Variables

const int kInvalidHandle = -1


Define Documentation

#define FILENAME_MAX   256
 

Definition at line 91 of file ncbifile.hpp.

Referenced by odbc_get_dsn_info().

#define PATH_MAX   FILENAME_MAX
 

Definition at line 103 of file ncbifile.hpp.

Referenced by CSymLink::Create(), CSocket::GetPeerAddress(), and CDirEntry::LookupLink().


Typedef Documentation

typedef CErrnoTemplException<CFileException> CFileErrnoException_Base
 

Definition at line 157 of file ncbifile.hpp.

typedef int TFileHandle
 

Definition at line 115 of file ncbifile.hpp.

typedef int TFindFiles
 

Bitwise OR of "EFindFiles".

Definition at line 2404 of file ncbifile.hpp.


Enumeration Type Documentation

enum EFindFiles
 

File finding flags.

Enumerator:
fFF_File  find files
fFF_Dir  find directories
fFF_Recursive  descend into sub-dirs
fFF_Nocase  case-insensitive names search
fFF_Default  default behaviur

Definition at line 2396 of file ncbifile.hpp.


Function Documentation

void FindFiles const string &  pattern,
list< string > &  result,
TFindFiles  flags
 

Utility function working like glob(): takes a pattern and fills the result list with files/directories matching the pattern.

Definition at line 4848 of file ncbifile.cpp.

References CDirEntry::CreateAbsolutePath(), CDirEntry::GetPathSeparator(), and NStr::Split().

template<class TContainer, class TPathIterator, class TMaskIterator>
void FindFiles TContainer &  out,
TPathIterator  first_path,
TPathIterator  last_path,
TMaskIterator  first_mask,
TMaskIterator  last_mask,
TFindFiles  flags = fFF_Default
 

Utility algorithm scans the provided directories using iterators finds files to match the masks and stores all found files in the container object.

Definition at line 2726 of file ncbifile.hpp.

References FindFiles().

template<class TContainer, class TPathIterator>
void FindFiles TContainer &  out,
TPathIterator  first_path,
TPathIterator  last_path,
const CMask masks,
TFindFiles  flags = fFF_Default
 

Utility algorithm scans the provided directories using iterators finds files to match the masks and stores all found files in the container object.

Definition at line 2695 of file ncbifile.hpp.

References FindFiles().

template<class TContainer, class TPathIterator>
void FindFiles TContainer &  out,
TPathIterator  first_path,
TPathIterator  last_path,
const vector< string > &  masks,
TFindFiles  flags = fFF_Default
 

Utility algorithm scans the provided directories using iterators finds files to match the masks and stores all found files in the container object.

Definition at line 2664 of file ncbifile.hpp.

References FindFiles().

template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles TPathIterator  path_begin,
TPathIterator  path_end,
const CMask masks,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Generic algorithm for file search.

Algorithm scans the provided directories using iterators, finds files to match the masks and stores all calls functor object for all found entries. Functor call should match: void Functor(const CDirEntry& dir_entry).

Definition at line 2605 of file ncbifile.hpp.

References FindFilesInDir().

template<class TPathIterator, class TMaskIterator, class TFindFunc>
TFindFunc FindFiles TPathIterator  path_begin,
TPathIterator  path_end,
TMaskIterator  mask_begin,
TMaskIterator  mask_end,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Generic algorithm for file search.

Algorithm scans the provided directories using iterators, finds files to match the masks and stores all calls functor object for all found entries. Functor call should match: void Functor(const CDirEntry& dir_entry).

Definition at line 2578 of file ncbifile.hpp.

template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles TPathIterator  path_begin,
TPathIterator  path_end,
const vector< string > &  masks,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Generic algorithm for file search.

Algorithm scans the provided directories using iterators, finds files to match the masks and stores all calls functor object for all found entries. Functor call should match: void Functor(const CDirEntry& dir_entry).

The difference between FindFiles<> and FileFiles2<> is that last one use two different masks - one for dir entries (files and/or subdirs) and second for subdirectories, that will be used for recursive search. FindFiles<> use one set of masks for all subdirectories with recursive search.

Definition at line 2530 of file ncbifile.hpp.

References FindFilesInDir().

Referenced by CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CDllResolver::FindCandidates(), FindFiles(), CGBenchMonitorApp::Run(), s_WindowMaskerTaxidToDb(), and x_Glob().

template<class TContainer, class TPathIterator>
void FindFiles2 TContainer &  out,
TPathIterator  first_path,
TPathIterator  last_path,
const CMask masks,
const CMask masks_subdir,
TFindFiles  flags = fFF_Default
 

Definition at line 2706 of file ncbifile.hpp.

References FindFiles2().

template<class TContainer, class TPathIterator>
void FindFiles2 TContainer &  out,
TPathIterator  first_path,
TPathIterator  last_path,
const vector< string > &  masks,
const vector< string > &  masks_subdir,
TFindFiles  flags = fFF_Default
 

Definition at line 2675 of file ncbifile.hpp.

References FindFiles2().

template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles2 TPathIterator  path_begin,
TPathIterator  path_end,
const CMask masks,
const CMask masks_subdir,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Definition at line 2623 of file ncbifile.hpp.

References FindFilesInDir().

template<class TPathIterator, class TFindFunc>
TFindFunc FindFiles2 TPathIterator  path_begin,
TPathIterator  path_end,
const vector< string > &  masks,
const vector< string > &  masks_subdir,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Definition at line 2548 of file ncbifile.hpp.

References FindFilesInDir().

Referenced by FindFiles2().

template<class TFindFunc>
TFindFunc FindFilesInDir const CDir dir,
const CMask masks,
const CMask masks_subdir,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Find files in the specified directory.

Definition at line 2461 of file ncbifile.hpp.

References CDirEntry::AddTrailingPathSeparator(), NStr::eCase, NStr::eNocase, fFF_File, fFF_Nocase, CDir::fIgnorePath, CDir::fIgnoreRecursive, CDir::GetEntriesPtr(), and CDirEntry::GetPath().

template<class TFindFunc>
TFindFunc FindFilesInDir const CDir dir,
const vector< string > &  masks,
const vector< string > &  masks_subdir,
TFindFunc &  find_func,
TFindFiles  flags = fFF_Default
 

Find files in the specified directory.

Definition at line 2409 of file ncbifile.hpp.

References CDirEntry::AddTrailingPathSeparator(), NStr::eCase, NStr::eNocase, fFF_Dir, fFF_File, fFF_Nocase, CDir::fIgnorePath, CDir::fIgnoreRecursive, CDir::GetEntriesPtr(), and CDirEntry::GetPath().

Referenced by FindBlastDBs(), FindFiles(), and FindFiles2().


Variable Documentation

const int kInvalidHandle = -1
 

Definition at line 116 of file ncbifile.hpp.

Referenced by CFileIO::Close(), CMemoryFile::CMemoryFile(), CMemoryFileMap::CMemoryFileMap(), CMemoryFileMap::Map(), CFileIO::Open(), CMemoryFileMap::x_Close(), CMemoryFileMap::x_GetMemoryFileSegment(), CFileLock::x_Init(), CMemoryFileMap::x_Open(), CFileIO::~CFileIO(), and CFileLock::~CFileLock().


Generated on Mon Dec 7 16:01:31 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:24:35 2009 by modify_doxy.py rev. 173732