A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/group__Files.html below:

NCBI C++ ToolKit: File System Access

enum   CFileException::EErrCode {
  CFileException::eMemoryMap , CFileException::eRelativePath , CFileException::eNotExists , CFileException::eFileSystemInfo ,
  CFileException::eFileIO , CFileException::eTmpFile
}   Error types that file operations can generate. More...
  enum   CFileErrnoException::EErrCode { CFileErrnoException::eFile , CFileErrnoException::eFileSystemInfo , CFileErrnoException::eFileLock , CFileErrnoException::eFileIO }   Error types. More...
  enum   CDirEntry::EIfEmptyPath { CDirEntry::eIfEmptyPath_Empty , CDirEntry::eIfEmptyPath_Current }   What GetDir() should return if the dir entry does not contain path. More...
  enum   CDirEntry::ERelativeToWhat { CDirEntry::eRelativeToCwd , CDirEntry::eRelativeToExe }   How to interpret relative paths. More...
  enum   CDirEntry::ECopyFlags {
  CDirEntry::fCF_Overwrite = (1 << 1) , CDirEntry::fCF_Update = (1 << 2) | fCF_Overwrite , CDirEntry::fCF_Backup = (1 << 3) | fCF_Overwrite , CDirEntry::fCF_Safe = (1 << 4) | fCF_Overwrite ,
  CDirEntry::fCF_TopDirOnly = (1 << 6) , CDirEntry::fCF_EqualTypes = (1 << 7) , CDirEntry::fCF_FollowLinks = (1 << 8) , CDirEntry::fCF_Verify = (1 << 9) ,
  CDirEntry::fCF_PreserveOwner = (1 << 10) , CDirEntry::fCF_PreservePerm = (1 << 11) , CDirEntry::fCF_PreserveTime = (1 << 12) , CDirEntry::fCF_PreserveAll = fCF_PreserveOwner | fCF_PreservePerm | fCF_PreserveTime ,
  CDirEntry::fCF_Recursive = (1 << 14) , CDirEntry::fCF_SkipUnsupported = (1 << 15) , CDirEntry::fCF_Default = fCF_Recursive | fCF_FollowLinks
}   Copy flags. More...
  enum   CDirEntry::ERenameFlags {
  CDirEntry::fRF_Overwrite = (1 << 1) , CDirEntry::fRF_Update = (1 << 2) | fCF_Overwrite , CDirEntry::fRF_Backup = (1 << 3) | fCF_Overwrite , CDirEntry::fRF_EqualTypes = (1 << 4) ,
  CDirEntry::fRF_FollowLinks = (1 << 5) , CDirEntry::fRF_Default = 0
}   Rename flags. More...
  enum   CDirEntry::EBackupMode { CDirEntry::eBackup_Copy = (1 << 1) , CDirEntry::eBackup_Rename = (1 << 2) , CDirEntry::eBackup_Default = eBackup_Copy }   Backup modes. More...
  enum   CDirEntry::EProcessingFlags {
  CDirEntry::fEntry = (1 << 0) , CDirEntry::fDir_Self = fEntry , CDirEntry::fDir_Files = (1 << 1) , CDirEntry::fDir_Subdirs = (1 << 2) ,
  CDirEntry::fDir_Recursive = (1 << 3) , CDirEntry::fDir_All = fDir_Self + fDir_Files + fDir_Subdirs , CDirEntry::fIgnoreMissing = (1 << 4) , CDirEntry::fProcessAll = (1 << 5) ,
  CDirEntry::eOnlyEmpty = fDir_Self , CDirEntry::eEntryOnly = fDir_Self , CDirEntry::eTopDirOnly = fDir_Self | fDir_Files , CDirEntry::eNonRecursive = fDir_All ,
  CDirEntry::eRecursive = fDir_All | fDir_Recursive , CDirEntry::eRecursiveStopOnErrors = eRecursive , CDirEntry::eRecursiveIgnoreMissing = eRecursive | fIgnoreMissing , CDirEntry::eRecursiveNotStopOnErrors = eRecursive | fIgnoreMissing | fProcessAll
}   Entries processing flags. More...
  enum   CDirEntry::EType {
  CDirEntry::eFile = 0 , CDirEntry::eDir , CDirEntry::ePipe , CDirEntry::eLink ,
  CDirEntry::eSymLink = eLink , CDirEntry::eSocket , CDirEntry::eDoor , CDirEntry::eBlockSpecial ,
  CDirEntry::eCharSpecial , CDirEntry::eUnknown
}   Directory entry type. More...
  enum   CDirEntry::EIfAbsent { CDirEntry::eIfAbsent_Throw , CDirEntry::eIfAbsent_Newer , CDirEntry::eIfAbsent_NotNewer }   What IsNewer() should do if the dir entry does not exist or is not accessible. More...
  enum   CDirEntry::EIfAbsent2 {
  CDirEntry::fHasThisNoPath_Newer = (1 << 0) , CDirEntry::fHasThisNoPath_NotNewer = (1 << 1) , CDirEntry::fNoThisHasPath_Newer = (1 << 2) , CDirEntry::fNoThisHasPath_NotNewer = (1 << 3) ,
  CDirEntry::fNoThisNoPath_Newer = (1 << 4) , CDirEntry::fNoThisNoPath_NotNewer = (1 << 5)
}   What path version of IsNewer() should do if the dir entry or specified path does not exist or is not accessible. More...
  enum   CDirEntry::EMode {
  CDirEntry::fExecute = 1 , CDirEntry::fWrite = 2 , CDirEntry::fRead = 4 , CDirEntry::fDefault = 8 ,
  CDirEntry::fDefaultDirUser = fRead | fExecute | fWrite , CDirEntry::fDefaultDirGroup = fRead | fExecute , CDirEntry::fDefaultDirOther = fRead | fExecute , CDirEntry::fDefaultUser = fRead | fWrite ,
  CDirEntry::fDefaultGroup = fRead , CDirEntry::fDefaultOther = fRead
}   Directory entry access permissions. More...
  enum   CDirEntry::ESpecialModeBits { CDirEntry::fSticky = 1 , CDirEntry::fSetGID = 2 , CDirEntry::fSetUID = 4 }   enum   CDirEntry::EModeRelative { CDirEntry::fModeAdd = 16 , CDirEntry::fModeRemove = 32 , CDirEntry::fModeNoChange = 64 }   Relative permissions change modes. More...
  enum   CDirEntry::EModeStringFormat { CDirEntry::eModeFormat_Octal , CDirEntry::eModeFormat_Symbolic , CDirEntry::eModeFormat_List , CDirEntry::eModeFormat_Default = eModeFormat_Octal }   Permission mode string format. More...
  enum   CDirEntry::ETmpFileCreationMode { CDirEntry::eTmpFileCreate , CDirEntry::eTmpFileGetName }   Temporary file creation mode. More...
  enum   CDirEntry::ETextBinary { CDirEntry::eText , CDirEntry::eBinary }   What type of temporary file to create. More...
  enum   CDirEntry::EAllowRead { CDirEntry::eAllowRead , CDirEntry::eWriteOnly }   Which operations to allow on temporary file. More...
  enum   CDirEntry::EWho { CDirEntry::eUser = 0 , CDirEntry::eGroup , CDirEntry::eOther , CDirEntry::eSpecial }   Which default mode: user, group, or other. More...
  enum   CFile::ECompareText { CFile::eIgnoreEol = eCompareText_IgnoreEol , CFile::eIgnoreWs = eCompareText_IgnoreWhiteSpace }   Mode to compare streams in text form. More...
  enum   CDir::EHomeWindows { CDir::eHomeWindows_AppData , CDir::eHomeWindows_UserProfile }   Windows specific: Historically, we try to use APPDATA% first, and use USERPROFILE% as a fallback to detect a "home" directory on Windows. More...
  enum   CDir::EGetEntriesFlags {
  CDir::fIgnoreRecursive = (1<<1) , CDir::fCreateObjects = (1<<2) , CDir::fNoCase = (1<<3) , CDir::fIgnorePath = (1<<4) ,
  CDir::fThrowOnError = (1<<5) , CDir::eAllEntries = 0 , CDir::eIgnoreRecursive = fIgnoreRecursive
}   Flags for GetEntries() More...
  enum   CDir::ECreateFlags {
  CDir::fCreate_Default = 0 , CDir::fCreate_PermByUmask = (1 << 1) , CDir::fCreate_PermAsParent = (1 << 2) , CDir::fCreate_ErrorIfExists = (1 << 3) ,
  CDir::fCreate_UpdateIfExists = (1 << 4)
}   Flags for Create()/CreatePath() More...
  enum   CFileUtil::EFileSystemType {
  CFileUtil::eUnknown = 0 , CFileUtil::eADFS , CFileUtil::eAdvFS , CFileUtil::eAFFS ,
  CFileUtil::eAFS , CFileUtil::eAUTOFS , CFileUtil::eBEFS , CFileUtil::eBFS ,
  CFileUtil::eCacheFS , CFileUtil::eCryptFS , CFileUtil::eCDFS , CFileUtil::eCIFS ,
  CFileUtil::eCODA , CFileUtil::eCOH , CFileUtil::eCRAMFS , CFileUtil::eDebugFS ,
  CFileUtil::eDEVFS , CFileUtil::eDFS , CFileUtil::eEFS , CFileUtil::eEXOFS ,
  CFileUtil::eExt , CFileUtil::eExt2 , CFileUtil::eExt3 , CFileUtil::eFAT ,
  CFileUtil::eFAT32 , CFileUtil::eFDFS , CFileUtil::eFFM , CFileUtil::eFFS ,
  CFileUtil::eFUSE , CFileUtil::eFUSE_CTL , CFileUtil::eGFS2 , CFileUtil::eGPFS ,
  CFileUtil::eHFS , CFileUtil::eHFSPLUS , CFileUtil::eHPFS , CFileUtil::eHSFS ,
  CFileUtil::eJFS , CFileUtil::eJFFS , CFileUtil::eJFFS2 , CFileUtil::eLOFS ,
  CFileUtil::eMFS , CFileUtil::eMinix , CFileUtil::eMinix2 , CFileUtil::eMinix3 ,
  CFileUtil::eMSFS , CFileUtil::eNCPFS , CFileUtil::eNFS , CFileUtil::eNTFS ,
  CFileUtil::eOCFS2 , CFileUtil::eOPENPROM , CFileUtil::ePANFS , CFileUtil::ePROC ,
  CFileUtil::ePVFS2 , CFileUtil::eReiserFS , CFileUtil::eRFS , CFileUtil::eQNX4 ,
  CFileUtil::eROMFS , CFileUtil::eSELINUX , CFileUtil::eSMBFS , CFileUtil::eSPECFS ,
  CFileUtil::eSquashFS , CFileUtil::eSYSFS , CFileUtil::eSYSV2 , CFileUtil::eSYSV4 ,
  CFileUtil::eTMPFS , CFileUtil::eUBIFS , CFileUtil::eUDF , CFileUtil::eUFS ,
  CFileUtil::eUFS2 , CFileUtil::eUSBDEVICE , CFileUtil::eV7 , CFileUtil::eVxFS ,
  CFileUtil::eVZFS , CFileUtil::eXENIX , CFileUtil::eXFS , CFileUtil::eXIAFS
}   Unix: The path name to any file/dir withing file system. More...
  enum   CTmpFile::ERemoveMode { CTmpFile::eRemove , CTmpFile::eNoRemove }   What to do with the file on object destruction. More...
  enum   CTmpFile::EIfExists { CTmpFile::eIfExists_Throw , CTmpFile::eIfExists_Reset , CTmpFile::eIfExists_ReturnCurrent }   What to do if stream already exists in the AsInputFile/AsOutputFile. More...
  enum   CMemoryFile_Base::EMemMapProtect { CMemoryFile_Base::eMMP_Read , CMemoryFile_Base::eMMP_Write , CMemoryFile_Base::eMMP_ReadWrite }   Which operations are permitted in memory map file. More...
  enum   CMemoryFile_Base::EMemMapShare { CMemoryFile_Base::eMMS_Shared , CMemoryFile_Base::eMMS_Private }   Whether to share changes or not. More...
  enum   CMemoryFile_Base::EOpenMode { CMemoryFile_Base::eCreate , CMemoryFile_Base::eOpen , CMemoryFile_Base::eExtend , CMemoryFile_Base::eDefault = eOpen }   Memory file open mode. More...
  enum   CMemoryFile_Base::EMemMapAdvise {
  CMemoryFile_Base::eMMA_Normal = eMADV_Normal , CMemoryFile_Base::eMMA_Random = eMADV_Random , CMemoryFile_Base::eMMA_Sequential = eMADV_Sequential , CMemoryFile_Base::eMMA_WillNeed = eMADV_WillNeed ,
  CMemoryFile_Base::eMMA_DontNeed = eMADV_DontNeed , CMemoryFile_Base::eMMA_DoFork = eMADV_DoFork , CMemoryFile_Base::eMMA_DontFork = eMADV_DontFork , CMemoryFile_Base::eMMA_Mergeable = eMADV_Mergeable ,
  CMemoryFile_Base::eMMA_Unmergeable = eMADV_Unmergeable
}   What type of data access pattern will be used for mapped region. More...
  enum   EFindFiles {
  fFF_File = (1 << 0) , fFF_Dir = (1 << 1) , fFF_All = fFF_File | fFF_Dir , fFF_Recursive = (1 << 2) ,
  fFF_Nocase = (1 << 3) , fFF_Default = fFF_All
}   File finding flags. More...
  enum   SCompareDirEntries::ESort {
  SCompareDirEntries::ePath , SCompareDirEntries::eDir , SCompareDirEntries::eName , SCompareDirEntries::eBase ,
  SCompareDirEntries::eExt
}   Sorting mode. More...
  enum   CFileIO_Base::EOpenMode {
  CFileIO_Base::eCreate , CFileIO_Base::eCreateNew , CFileIO_Base::eOpen , CFileIO_Base::eOpenAlways ,
  CFileIO_Base::eTruncate
}   File open mode. More...
  enum   CFileIO_Base::EAccessMode { CFileIO_Base::eRead , CFileIO_Base::eWrite , CFileIO_Base::eReadWrite }   Which I/O operations permitted on the file. More...
  enum   CFileIO_Base::EShareMode { CFileIO_Base::eShareRead , CFileIO_Base::eShareWrite , CFileIO_Base::eShare , CFileIO_Base::eExclusive }   Sharing mode for opened file. More...
  enum   CFileIO_Base::EPositionMoveMethod { CFileIO_Base::eBegin , CFileIO_Base::eCurrent , CFileIO_Base::eEnd }   Which starting point to use for the moves of the file pointer. More...
  enum   CFileIO::EAutoRemove { CFileIO::eDoNotRemove , CFileIO::eRemoveInClose , CFileIO::eRemoveASAP }   Controls how temporary file is removed. More...
  enum   CFileLock::EType { CFileLock::eShared , CFileLock::eExclusive }   Type of file lock. More...
  enum   CFileLock::EFlags {
  CFileLock::fLockNow = (1 << 1) , CFileLock::fLockLater = (1 << 2) , CFileLock::fAutoUnlock = (1 << 3) , CFileLock::fNoAutoUnlock = (1 << 4) ,
  CFileLock::fDefault = fLockNow | fAutoUnlock
}   Flags, used in constructors. More...
  virtual const char *  CFileException::GetErrCodeString (void) const override   Translate from an error code value to its string representation. More...
    CFileException::NCBI_EXCEPTION_DEFAULT (CFileException, CCoreException)   virtual const char *  CFileErrnoException::GetErrCodeString (void) const override   Translate from an error code value to its string representation. More...
    CFileErrnoException::NCBI_EXCEPTION_DEFAULT (CFileErrnoException, CFileErrnoException_Base)   static void  CFileAPI::SetLogging (ESwitch on_off_default)   Enable or disable logging of errors from the File API classes. More...
  static void  CFileAPI::SetHonorUmask (ESwitch on_off_default)   Enable or disable honoring umask settings on Unix for newly created files/directories in the File API. More...
  static void  CFileAPI::SetDeleteReadOnlyFiles (ESwitch on_off_default)   Specify whether read-only files can be deleted via CDirEntry::Remove() on Windows. More...
    CDirEntry::CDirEntry (void)   Default constructor. More...
    CDirEntry::CDirEntry (const string &path)   Constructor using specified path string. More...
    CDirEntry::CDirEntry (const CDirEntry &other)   Copy constructor. More...
  virtual  CDirEntry::~CDirEntry (void)   Destructor. More...
  const stringCDirEntry::GetPath (void) const   Get entry path. More...
  void  CDirEntry::Reset (const string &path)   Reset path string. More...
  CDirEntryCDirEntry::operator= (const CDirEntry &other)   Assignment operator. More...
  static void  CDirEntry::SplitPath (const string &path, string *dir=0, string *base=0, string *ext=0)   Split a path string into its basic components. More...
  static void  CDirEntry::SplitPathEx (const string &path, string *disk=0, string *dir=0, string *base=0, string *ext=0)   Split a path string into its basic components. More...
  string  CDirEntry::GetDir (EIfEmptyPath mode=eIfEmptyPath_Current) const   Get the directory component for this directory entry. More...
  string  CDirEntry::GetName (void) const   Get the base entry name with extension (if any). More...
  string  CDirEntry::GetBase (void) const   Get the base entry name without extension. More...
  string  CDirEntry::GetExt (void) const   Get extension name. More...
  static string  CDirEntry::MakePath (const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)   Assemble a path from basic components. More...
  static char  CDirEntry::GetPathSeparator (void)   Get path separator symbol specific for the current platform. More...
  static bool  CDirEntry::IsPathSeparator (const char c)   Check whether a character "c" is a path separator symbol specific for the current platform. More...
  static string  CDirEntry::AddTrailingPathSeparator (const string &path)   Add trailing path separator, if needed. More...
  static string  CDirEntry::DeleteTrailingPathSeparator (const string &path)   Delete trailing path separator, if any. More...
  static string  CDirEntry::ConvertToOSPath (const string &path)   Convert "path" on any OS to the current OS-dependent path. More...
  static bool  CDirEntry::IsAbsolutePath (const string &path)   Check if a "path" is absolute for the current OS. More...
  static bool  CDirEntry::IsAbsolutePathEx (const string &path)   Check if the "path" is absolute for any OS. More...
  static string  CDirEntry::GetNearestExistingParentDir (const string &path)   Given a path, gets the closest parent directory which actually exists. More...
  static string  CDirEntry::CreateRelativePath (const string &path_from, const string &path_to)   Create a relative path between two points in the file system specified by their absolute paths. More...
  static string  CDirEntry::CreateAbsolutePath (const string &path, ERelativeToWhat rtw=eRelativeToCwd)   Get an absolute path from some, possibly relative, path. More...
  static string  CDirEntry::CreateAbsolutePath (const string &path, const string &rtw)   Get an absolute path from some, possibly relative, path. More...
  static string  CDirEntry::ConcatPath (const string &first, const string &second)   Concatenate two parts of the path for the current OS. More...
  static string  CDirEntry::ConcatPathEx (const string &first, const string &second)   Concatenate two parts of the path for any OS. More...
  static string  CDirEntry::NormalizePath (const string &path, EFollowLinks follow_links=eIgnoreLinks)   Normalize a path. More...
  static bool  CDirEntry::MatchesMask (const string &name, const string &mask, NStr::ECase use_case=NStr::eCase)   Match a "name" against a simple filename "mask". More...
  static bool  CDirEntry::MatchesMask (const string &name, const vector< string > &masks, NStr::ECase use_case=NStr::eCase)   Match a "name" against a set of "masks" Note that any name match to empty vector of masks. More...
  static bool  CDirEntry::MatchesMask (const string &name, const CMask &mask, NStr::ECase use_case=NStr::eCase)   Match a "name" against a set of "masks" Note that any name match to empty set of masks. More...
  virtual bool  CDirEntry::Exists (void) const   Check the entry existence. More...
  virtual bool  CDirEntry::Copy (const string &new_path, TCopyFlags flags=fCF_Default, size_t buf_size=0) const   Copy the entry to a location specified by "new_path". More...
  bool  CDirEntry::CopyToDir (const string &dir, TCopyFlags flags=fCF_Default, size_t buf_size=0) const   Copy the entry to a specified directory. More...
  bool  CDirEntry::Rename (const string &new_path, TRenameFlags flags=fRF_Default)   Rename entry. More...
  bool  CDirEntry::MoveToDir (const string &dir, TCopyFlags flags=fRF_Default)   Move the entry to a specified directory. More...
  static const char *  CDirEntry::GetBackupSuffix (void)   Get backup suffix. More...
  static void  CDirEntry::SetBackupSuffix (const char *suffix)   Set backup suffix. More...
  bool  CDirEntry::Backup (const string &suffix=kEmptyStr, EBackupMode mode=eBackup_Default, TCopyFlags copyflags=fCF_Default, size_t copybufsize=0)   Backup an entry. More...
  virtual bool  CDirEntry::Remove (TRemoveFlags flags=eRecursive) const   Remove a directory entry. More...
  virtual bool  CDirEntry::RemoveEntry (TRemoveFlags flags=eEntryOnly) const   Remove a directory entry. More...
  static CDirEntryCDirEntry::CreateObject (EType type, const string &path=kEmptyStr)   Construct a directory entry object of a specified type. More...
  virtual EType  CDirEntry::GetObjectType (void) const   Get a type of constructed object. More...
  bool  CDirEntry::Stat (struct SStat *buffer, EFollowLinks follow_links=eIgnoreLinks) const   Get status information on a dir entry. More...
  EType  CDirEntry::GetType (EFollowLinks follow=eIgnoreLinks) const   Get a type of a directory entry. More...
  static EType  CDirEntry::GetType (const TNcbiSys_stat &st)   Get a type of a directory entry by status information. More...
  bool  CDirEntry::IsFile (EFollowLinks follow=eFollowLinks) const   Check whether a directory entry is a file. More...
  bool  CDirEntry::IsDir (EFollowLinks follow=eFollowLinks) const   Check whether a directory entry is a directory. More...
  bool  CDirEntry::IsLink (void) const   Check whether a directory entry is a symbolic link (alias). More...
  string  CDirEntry::LookupLink (void) const   Get an entry name that a link points to. More...
  void  CDirEntry::DereferenceLink (ENormalizePath normalize=eNormalizePath)   Dereference a link. More...
  void  CDirEntry::DereferencePath (void)   Dereference a path. More...
  bool  CDirEntry::GetTime (CTime *modification, CTime *last_access=0, CTime *creation=0) const   Get time stamp(s) of a directory entry. More...
  bool  CDirEntry::GetTimeT (time_t *modification, time_t *last_access=0, time_t *creation=0) const   Get time stamp(s) of a directory entry (time_t version). More...
  bool  CDirEntry::SetTime (const CTime *modification=0, const CTime *last_access=0, const CTime *creation=0) const   Set time stamp(s) of a directory entry. More...
  bool  CDirEntry::SetTimeT (const time_t *modification=0, const time_t *last_access=0, const time_t *creation=0) const   Set time stamp(s) of a directory entry (time_t version). More...
  bool  CDirEntry::IsNewer (time_t tm, EIfAbsent if_absent) const   Check if the current entry is newer than a specified date/time. More...
  bool  CDirEntry::IsNewer (const CTime &tm, EIfAbsent if_absent) const   Check if the current entry is newer than a specified date/time. More...
  bool  CDirEntry::IsNewer (const string &path, TIfAbsent2 if_absent) const   Check if the current entry is newer than some other. More...
  bool  CDirEntry::IsIdentical (const string &entry_name, EFollowLinks follow_links=eIgnoreLinks) const   Check if the current entry and the given entry_name are identical. More...
  bool  CDirEntry::GetOwner (string *owner, string *group=0, EFollowLinks follow=eFollowLinks, unsigned int *uid=0, unsigned int *gid=0) const   Get an entry owner. More...
  bool  CDirEntry::SetOwner (const string &owner, const string &group=kEmptyStr, EFollowLinks follow=eFollowLinks, unsigned int *uid=0, unsigned int *gid=0) const   Set an entry owner and/or group. More...
  bool  CDirEntry::GetMode (TMode *user_mode, TMode *group_mode=0, TMode *other_mode=0, TSpecialModeBits *special=0) const   Get permission mode(s) of a directory entry. More...
  virtual bool  CDirEntry::SetMode (TMode user_mode, TMode group_mode=fDefault, TMode other_mode=fDefault, TSpecialModeBits special=0, TSetModeFlags flags=eEntryOnly) const   Set permission mode(s) of a directory entry. More...
  virtual bool  CDirEntry::SetModeEntry (TMode user_mode, TMode group_mode=fDefault, TMode other_mode=fDefault, TSpecialModeBits special=0, TSetModeFlags flags=eEntryOnly) const   Set permission mode(s) of a directory entry. More...
  static void  CDirEntry::SetDefaultModeGlobal (EType entry_type, TMode user_mode, TMode group_mode=fDefault, TMode other_mode=fDefault, TSpecialModeBits special=0)   Set default permission modes globally for all CDirEntry objects. More...
  virtual void  CDirEntry::SetDefaultMode (EType entry_type, TMode user_mode, TMode group_mode=fDefault, TMode other_mode=fDefault, TSpecialModeBits special=0)   Set default mode(s) for this entry only. More...
  bool  CDirEntry::CheckAccess (TMode access_mode) const   Check access rights. More...
  static mode_t  CDirEntry::MakeModeT (TMode user_mode, TMode group_mode, TMode other_mode, TSpecialModeBits special)   Construct mode_t value from permission modes. More...
  static void  CDirEntry::ModeFromModeT (mode_t mode, TMode *user_mode, TMode *group_mode=0, TMode *other_mode=0, TSpecialModeBits *special=0)   Convert mode_t to permission mode(s). More...
  static string  CDirEntry::ModeToString (TMode user_mode, TMode group_mode, TMode other_mode, TSpecialModeBits special, EModeStringFormat format=eModeFormat_Default)   Convert permission modes to string representation using one of predefined formats. More...
  static bool  CDirEntry::StringToMode (const CTempString &mode, TMode *user_mode, TMode *group_mode=0, TMode *other_mode=0, TSpecialModeBits *special=0)   Convert string (in one of predefined formats, detects automatically) to permission mode(s). More...
  static void  CDirEntry::GetUmask (TMode *user_mode, TMode *group_mode=0, TMode *other_mode=0, TSpecialModeBits *special=0)   Get file/directory mode creation mask. More...
  static void  CDirEntry::SetUmask (TMode user_mode, TMode group_mode=fDefault, TMode other_mode=fDefault, TSpecialModeBits special=0)   Set file/directory mode creation mask. More...
  static string  CDirEntry::GetTmpName (ETmpFileCreationMode mode=eTmpFileGetName)   Get temporary file name. More...
  static string  CDirEntry::GetTmpNameEx (const string &dir=kEmptyStr, const string &prefix=kEmptyStr, ETmpFileCreationMode mode=eTmpFileGetName)   Get temporary file name. More...
  static fstream *  CDirEntry::CreateTmpFile (const string &filename=kEmptyStr, ETextBinary text_binary=eBinary, EAllowRead allow_read=eAllowRead)   Create temporary file and return pointer to corresponding stream. More...
  static fstream *  CDirEntry::CreateTmpFileEx (const string &dir=".", const string &prefix=kEmptyStr, ETextBinary text_binary=eBinary, EAllowRead allow_read=eAllowRead)   Create temporary file and return pointer to corresponding stream. More...
  static void  CDirEntry::GetDefaultModeGlobal (EType entry_type, TMode *user_mode, TMode *group_mode, TMode *other_mode, TSpecialModeBits *special)   Get the default global mode. More...
  void  CDirEntry::GetDefaultMode (TMode *user_mode, TMode *group_mode, TMode *other_mode, TSpecialModeBits *special) const   Get the default mode. More...
  mode_t  CDirEntry::GetDefaultModeT (void) const   static string  CDirEntry::x_ModeToSymbolicString (EWho who, TMode mode, bool special_bit, char filler)   Convert permission mode to symbolic string representation. More...
    CFile::CFile (void)   Default constructor. More...
    CFile::CFile (const string &file)   Constructor using specified path string. More...
    CFile::CFile (const CDirEntry &file)   Copy constructor. More...
  virtual  CFile::~CFile (void)   Destructor. More...
  virtual EType  CFile::GetObjectType (void) const   Get a type of constructed object. More...
  virtual bool  CFile::Exists (void) const   Check existence of file. More...
  Int8  CFile::GetLength (void) const   Get size of file. More...
  virtual bool  CFile::Copy (const string &new_path, TCopyFlags flags=fCF_Default, size_t buf_size=0) const   Copy a file. More...
  bool  CFile::Compare (const string &file, size_t buf_size=0) const   Compare files contents in binary form. More...
  bool  CFile::CompareTextContents (const string &file, ECompareText mode, size_t buf_size=0) const   Compare files contents in text form. More...
    CDir::CDir (void)   Default constructor. More...
    CDir::CDir (const string &dirname)   Constructor using specified directory name. More...
    CDir::CDir (const CDirEntry &dir)   Copy constructor. More...
  virtual  CDir::~CDir (void)   Destructor. More...
  virtual EType  CDir::GetObjectType (void) const   Get a type of constructed object. More...
  virtual bool  CDir::Exists (void) const   Check if directory "dirname" exists. More...
  static string  CDir::GetHome (EHomeWindows home=eHomeWindows_AppData)   Get user "home" directory. More...
  static string  CDir::GetTmpDir (void)   Get temporary directory. More...
  static string  CDir::GetAppTmpDir (void)   Get temporary directory name for application. More...
  static string  CDir::GetCwd (void)   Get the current working directory. More...
  static bool  CDir::SetCwd (const string &dir)   Change the current working directory. More...
  TEntries  CDir::GetEntries (const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const   Get directory entries based on the specified "mask". More...
  TEntries  CDir::GetEntries (const vector< string > &masks, TGetEntriesFlags flags=0) const   Get directory entries based on the specified set of "masks". More...
  TEntries  CDir::GetEntries (const CMask &masks, TGetEntriesFlags flags=0) const   Get directory entries based on the specified set of "masks". More...
  TEntriesCDir::GetEntriesPtr (const string &mask=kEmptyStr, TGetEntriesFlags flags=0) const   Get directory entries based on the specified "mask". More...
  TEntriesCDir::GetEntriesPtr (const vector< string > &masks, TGetEntriesFlags flags=0) const   Get directory entries based on the specified set of "masks". More...
  TEntriesCDir::GetEntriesPtr (const CMask &masks, TGetEntriesFlags flags=0) const   Get directory entries based on the specified set of "masks". More...
  TEntries  CDir::GetEntries (const string &mask, EGetEntriesMode mode, NStr::ECase use_case) const   TEntries  CDir::GetEntries (const vector< string > &masks, EGetEntriesMode mode, NStr::ECase use_case) const   TEntries  CDir::GetEntries (const CMask &masks, EGetEntriesMode mode, NStr::ECase use_case) const   TEntriesCDir::GetEntriesPtr (const string &mask, EGetEntriesMode mode, NStr::ECase use_case) const   TEntriesCDir::GetEntriesPtr (const vector< string > &masks, EGetEntriesMode mode, NStr::ECase use_case) const   TEntriesCDir::GetEntriesPtr (const CMask &masks, EGetEntriesMode mode, NStr::ECase use_case) const   bool  CDir::Create (TCreateFlags flags=fCreate_Default) const   Create the directory using "dirname" passed in the constructor. More...
  bool  CDir::CreatePath (TCreateFlags flags=fCreate_Default) const   Create the directory path recursively possibly more than one at a time. More...
  virtual bool  CDir::Copy (const string &new_path, TCopyFlags flags=fCF_Default, size_t buf_size=0) const   Copy directory. More...
  virtual bool  CDir::Remove (TRemoveFlags flags=eRecursive) const   Delete existing directory. More...
  virtual bool  CDir::SetMode (TMode user_mode, TMode group_mode=fDefault, TMode other_mode=fDefault, TSpecialModeBits special=0, TSetModeFlags flags=eEntryOnly) const   Set permission mode(s) for a directory. More...
    CSymLink::CSymLink (void)   Default constructor. More...
    CSymLink::CSymLink (const string &link)   Constructor using specified path string. More...
    CSymLink::CSymLink (const CDirEntry &link)   Copy constructor. More...
  virtual  CSymLink::~CSymLink (void)   Destructor. More...
  virtual EType  CSymLink::GetObjectType (void) const   Get a type of constructed object. More...
  virtual bool  CSymLink::Exists (void) const   Check existence of link. More...
  bool  CSymLink::Create (const string &path) const   Create symbolic link. More...
  virtual bool  CSymLink::Copy (const string &new_path, TCopyFlags flags=fCF_Default, size_t buf_size=0) const   Copy link. More...
  static void  CFileUtil::GetFileSystemInfo (const string &path, SFileSystemInfo *info)   Get file system information. More...
  static Uint8  CFileUtil::GetFreeDiskSpace (const string &path)   Get free disk space information. More...
  static Uint8  CFileUtil::GetUsedDiskSpace (const string &path)   Get used disk space information. More...
  static Uint8  CFileUtil::GetTotalDiskSpace (const string &path)   Get total disk space information. More...
    CFileDeleteList::~CFileDeleteList ()   Destructor removes all dir entries on list. More...
  void  CFileDeleteList::Add (const string &path)   Add a path for later deletion. More...
  const TListCFileDeleteList::GetList () const   Get the underlying list. More...
  void  CFileDeleteList::SetList (TList &list)   Set the underlying list. More...
  static void  CFileDeleteAtExit::Add (const string &path)   Add the name of a dir entry; it will be deleted on (normal) exit. More...
  static const CFileDeleteListCFileDeleteAtExit::GetDeleteList ()   Get underlying static CFileDeleteList object. More...
  static void  CFileDeleteAtExit::SetDeleteList (CFileDeleteList &list)   Set the underlying static CFileDeleteList object. More...
    CTmpFile::CTmpFile (ERemoveMode remove_file=eRemove)   Default constructor. More...
    CTmpFile::CTmpFile (const string &file_name, ERemoveMode remove_file=eRemove)   Constructor. More...
    CTmpFile::~CTmpFile (void)   Destructor. More...
  CNcbiIstreamCTmpFile::AsInputFile (EIfExists if_exists, IOS_BASE::openmode mode=IOS_BASE::in)   Create I/O stream on the base of our file. More...
  CNcbiOstreamCTmpFile::AsOutputFile (EIfExists if_exists, IOS_BASE::openmode mode=IOS_BASE::out)   const stringCTmpFile::GetFileName (void) const   Return used file name (generated or given in the constructor). More...
    CTmpFile::CTmpFile (const CTmpFile &)   CTmpFileCTmpFile::operator= (const CTmpFile &)     CMemoryFile_Base::CMemoryFile_Base (void)   Constructor. More...
  static bool  CMemoryFile_Base::IsSupported (void)   Check if memory-mapping is supported by the C++ Toolkit on this platform. More...
  static bool  CMemoryFile_Base::MemMapAdviseAddr (void *addr, size_t len, EMemMapAdvise advise)   Advise on memory map usage for specified region. More...
    CMemoryFileSegment::CMemoryFileSegment (SMemoryFileHandle &handle, SMemoryFileAttrs &attrs, TOffsetType offset, size_t length)   Constructor. More...
    CMemoryFileSegment::~CMemoryFileSegment (void)   Destructor. More...
  void *  CMemoryFileSegment::GetPtr (void) const   Get pointer to beginning of data. More...
  TOffsetType  CMemoryFileSegment::GetOffset (void) const   Get offset of the mapped area from beginning of file. More...
  size_t  CMemoryFileSegment::GetSize (void) const   Get length of the mapped area. More...
  void *  CMemoryFileSegment::GetRealPtr (void) const   Get pointer to beginning of really mapped data. More...
  TOffsetType  CMemoryFileSegment::GetRealOffset (void) const   Get real offset of the mapped area from beginning of file. More...
  size_t  CMemoryFileSegment::GetRealSize (void) const   Get real length of the mapped area. More...
  bool  CMemoryFileSegment::Flush (void) const   Flush by writing all modified copies of memory pages to the underlying file. More...
  bool  CMemoryFileSegment::Unmap (void)   Unmap file view from memory. More...
  bool  CMemoryFileSegment::MemMapAdvise (EMemMapAdvise advise) const   Advise on mapped memory map usage. More...
  void  CMemoryFileSegment::x_Verify (void) const     CMemoryFileSegment::CMemoryFileSegment (const CMemoryFileSegment &)   void  CMemoryFileSegment::operator= (const CMemoryFileSegment &)     CMemoryFileMap::CMemoryFileMap (const string &file_name, EMemMapProtect protect_attr=eMMP_Read, EMemMapShare share_attr=eMMS_Shared, EOpenMode mode=eDefault, Uint8 max_file_len=0)   Constructor. More...
    CMemoryFileMap::~CMemoryFileMap (void)   Destructor. More...
  void *  CMemoryFileMap::Map (TOffsetType offset, size_t length)   Map file segment. More...
  bool  CMemoryFileMap::Unmap (void *ptr)   Unmap file segment. More...
  bool  CMemoryFileMap::UnmapAll (void)   Unmap all mapped segment. More...
  TOffsetType  CMemoryFileMap::GetOffset (void *ptr) const   Get offset of the mapped segment from beginning of the file. More...
  size_t  CMemoryFileMap::GetSize (void *ptr) const   Get length of the mapped segment. More...
  Int8  CMemoryFileMap::GetFileSize (void) const   Get length of the mapped file. More...
  bool  CMemoryFileMap::Flush (void *ptr) const   Flush memory mapped file segment. More...
  const CMemoryFileSegmentCMemoryFileMap::GetMemoryFileSegment (void *ptr) const   Get pointer to memory mapped file segment by pointer to data. More...
  bool  CMemoryFileMap::MemMapAdvise (void *ptr, EMemMapAdvise advise) const   Advise on mapped memory map usage. More...
  const stringCMemoryFileMap::GetFileName () const noexcept   Shows filename of memory mapped file. More...
  void  CMemoryFileMap::x_Open (void)   Open file mapping for file with name m_FileName. More...
  void  CMemoryFileMap::x_Close (void)   Unmap mapped memory and close mapped file. More...
  void  CMemoryFileMap::x_Create (Uint8 size)   Create new file or rewrite existent with zeros. More...
  void  CMemoryFileMap::x_Extend (Uint8 size, Uint8 new_size)   Extend file size from 'size' to 'new_size' with zero bytes. More...
  CMemoryFileSegmentCMemoryFileMap::x_GetMemoryFileSegment (void *ptr) const   Get pointer to memory mapped file segment by pointer to data. More...
    CMemoryFileMap::CMemoryFileMap (const CMemoryFileMap &)   void  CMemoryFileMap::operator= (const CMemoryFileMap &)     CMemoryFile::CMemoryFile (const string &file_name, EMemMapProtect protect_attr=eMMP_Read, EMemMapShare share_attr=eMMS_Shared, TOffsetType offset=0, size_t lendth=0, EOpenMode mode=eDefault, Uint8 max_file_len=0)   Constructor. More...
  void *  CMemoryFile::Map (TOffsetType offset=0, size_t length=0)   Map file. More...
  bool  CMemoryFile::Unmap (void)   Unmap file if mapped. More...
  void *  CMemoryFile::Extend (size_t new_lendth=0)   Extend length of the mapped region. More...
  void *  CMemoryFile::GetPtr (void) const   Get pointer to beginning of data. More...
  TOffsetType  CMemoryFile::GetOffset (void) const   Get offset of the mapped area from beginning of the file. More...
  size_t  CMemoryFile::GetSize (void) const   Get length of the mapped region. More...
  bool  CMemoryFile::Flush (void) const   Flush by writing all modified copies of memory pages to the underlying file. More...
  bool  CMemoryFile::MemMapAdvise (EMemMapAdvise advise) const   Advise on memory map usage. More...
  void  CMemoryFile::x_Verify (void) const     CMemoryFile::CMemoryFile (const CMemoryFile &)   void  CMemoryFile::operator= (const CMemoryFile &)   template<class TFindFunc > void  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. More...
  template<class TFindFunc > void  FindFilesInDir (const CDir &dir, const CMask &masks, const CMask &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)   Find files in the specified directory. More...
  template<class TPathIterator , class TFindFunc > void  FindFiles (TPathIterator path_begin, TPathIterator path_end, const vector< string > &masks, TFindFunc &find_func, TFindFiles flags=fFF_Default)   Generic algorithm for file search. More...
  template<class TPathIterator , class TFindFunc > void  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 > void  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. More...
  template<class TPathIterator , class TFindFunc > void  FindFiles (TPathIterator path_begin, TPathIterator path_end, const CMask &masks, TFindFunc &find_func, TFindFiles flags=fFF_Default)   Generic algorithm for file search. More...
  template<class TPathIterator , class TFindFunc > void  FindFiles2 (TPathIterator path_begin, TPathIterator path_end, const CMask &masks, const CMask &masks_subdir, TFindFunc &find_func, TFindFiles flags=fFF_Default)     CFindFileNamesFunc< TNames >::CFindFileNamesFunc (TNames &names)   void  CFindFileNamesFunc< TNames >::operator() (const CDirEntry &dir_entry)   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. More...
  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. More...
  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. More...
  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. More...
    SCompareDirEntries::SCompareDirEntries (ESort s1=ePath)   You can sort by up to 3 path components. More...
    SCompareDirEntries::SCompareDirEntries (ESort s1, ESort s2)     SCompareDirEntries::SCompareDirEntries (ESort s1, ESort s2, ESort s3)   bool  SCompareDirEntries::operator() (const CDir::TEntry &e1, const CDir::TEntry &e2)   Comparison operators. More...
  bool  SCompareDirEntries::operator() (const string &e1, const string &e2)     CFileIO::CFileIO (void)   Default constructor. More...
    CFileIO::~CFileIO (void)   Destruct object closing system handle if necessary. More...
  void  CFileIO::Open (const string &filename, EOpenMode open_mode, EAccessMode access_mode, EShareMode share_mode=eShare)   Open file. More...
  void  CFileIO::CreateTemporary (const string &dir, const string &prefix, EAutoRemove auto_remove=eRemoveInClose)   Create temporary file in the specified directory. More...
  void  CFileIO::Close (void)   Close file. More...
  size_t  CFileIO::Read (void *buf, size_t count) const   Read file. More...
  size_t  CFileIO::Write (const void *buf, size_t count) const   Write file. More...
  void  CFileIO::Flush (void) const   Flush file buffers. More...
  const stringCFileIO::GetPathname (void) const   Return file path and name as it was specified in the Open() method or created in CreateTemporary(). More...
  TFileHandle  CFileIO::GetFileHandle (void) const   Return system file handle associated with the file. More...
  void  CFileIO::SetFileHandle (TFileHandle handle)   Close previous handle if needed and use given handle for all I/O. More...
  Uint8  CFileIO::GetFilePos (void) const   Get file position. More...
  void  CFileIO::SetFilePos (Uint8 position) const   Set file position from beginning of the file. More...
  void  CFileIO::SetFilePos (Int8 offset, EPositionMoveMethod whence) const   Set file position. More...
  Uint8  CFileIO::GetFileSize (void) const   Get file size. More...
  void  CFileIO::SetFileSize (Uint8 length, EPositionMoveMethod pos=eCurrent) const   Set new size for the file. More...
  void  CFileIO::SetAutoClose (bool auto_close=true)   Define whether the open file handle needs to be closed in the destructor. More...
  void  CFileIO::SetAutoRemove (EAutoRemove auto_remove=eRemoveInClose)   Define whether the temporary file created by CreateTemporary() must be automatically removed in Close(). More...
    CFileIO::CFileIO (const CFileIO &)   void  CFileIO::operator= (const CFileIO &)     CFileReaderWriter_Base::CFileReaderWriter_Base (void)   Default constructor. More...
  TFileHandle  CFileReaderWriter_Base::GetFileHandle (void)   Return system file handle associated with the file. More...
  CFileIOCFileReaderWriter_Base::GetFileIO (void)   Get an underlaying file I/O object. More...
    CFileReaderWriter_Base::CFileReaderWriter_Base (const CFileReaderWriter_Base &)   void  CFileReaderWriter_Base::operator= (const CFileReaderWriter_Base &)     CFileReader::CFileReader (const string &filename, EShareMode share_mode=eShareRead)   Construct CFileReader for reading from the file with name 'filename'. More...
    CFileReader::CFileReader (const char *filename, EShareMode share_mode=eShareRead)     CFileReader::CFileReader (TFileHandle handle)   Construct CFileReader for reading from system handle 'handle'. More...
  static IReaderCFileReader::New (const string &filename, EShareMode share_mode=eShareRead)   Return a new IReader object corresponding to the given filename, taking "-" (but not "./-") to read from the standard input. More...
  virtual ERW_Result  CFileReader::Read (void *buf, size_t count, size_t *bytes_read=0)   Virtual methods from IReader. More...
  virtual ERW_Result  CFileReader::PendingCount (size_t *count)   Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking. More...
    CFileReader::CFileReader (const CFileReader &)   void  CFileReader::operator= (const CFileReader &)     CFileWriter::CFileWriter (const string &filename, EOpenMode open_mode=eCreate, EShareMode share_mode=eShareRead)   Construct CFileWriter for writing to the file with name 'filename'. More...
    CFileWriter::CFileWriter (const char *filename, EOpenMode open_mode=eCreate, EShareMode share_mode=eShareRead)     CFileWriter::CFileWriter (TFileHandle handle)   Construct CFileWriter for writing to system handle 'handle'. More...
  static IWriterCFileWriter::New (const string &filename, EOpenMode open_mode=eCreate, EShareMode share_mode=eShareRead)   Return a new IWriter object corresponding to the given filename, taking "-" (but not "./-") to write to the standard output. More...
  virtual ERW_Result  CFileWriter::Write (const void *buf, size_t count, size_t *bytes_written=0)   Virtual methods from IWriter. More...
  virtual ERW_Result  CFileWriter::Flush (void)   Flush pending data (if any) down to the output device. More...
    CFileWriter::CFileWriter (const CFileWriter &)   void  CFileWriter::operator= (const CFileWriter &)     CFileReaderWriter::CFileReaderWriter (const string &filename, EOpenMode open_mode=eOpen, EShareMode share_mode=eShareRead)   Construct CFileReaderWriter for reading/writing to/from the file with name 'filename'. More...
    CFileReaderWriter::CFileReaderWriter (const char *filename, EOpenMode open_mode=eOpen, EShareMode share_mode=eShareRead)     CFileReaderWriter::CFileReaderWriter (TFileHandle handle)   Construct CFileReaderWriter for writing to system handle 'handle'. More...
  static IReaderWriterCFileReaderWriter::New (const string &filename, EOpenMode open_mode=eOpen, EShareMode share_mode=eShareRead)   Return a new IReaderWriter object corresponding to the given filename. More...
  virtual ERW_Result  CFileReaderWriter::Read (void *buf, size_t count, size_t *bytes_read=0)   Virtual methods from IReaderWriter. More...
  virtual ERW_Result  CFileReaderWriter::PendingCount (size_t *count)   Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking. More...
  virtual ERW_Result  CFileReaderWriter::Write (const void *buf, size_t count, size_t *bytes_written=0)   Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device. More...
  virtual ERW_Result  CFileReaderWriter::Flush (void)   Flush pending data (if any) down to the output device. More...
    CFileReaderWriter::CFileReaderWriter (const CFileReaderWriter &)   void  CFileReaderWriter::operator= (const CFileReaderWriter &)     CFileLock::CFileLock (const string &filename, TFlags flags=fDefault, EType type=eShared, TOffsetType offset=0, size_t length=0)   Construct CFileLock for locking a file with a given name 'filename'. More...
    CFileLock::CFileLock (const char *filename, TFlags flags=fDefault, EType type=eShared, TOffsetType offset=0, size_t length=0)     CFileLock::CFileLock (TFileHandle handle, TFlags flags=fDefault, EType type=eShared, TOffsetType offset=0, size_t length=0)   Construct CFileLock for locking file by system file handle 'handle'. More...
    CFileLock::~CFileLock (void)   Destruct the CFileLock, close file and remove all locks if necessary. More...
  void  CFileLock::Lock (EType type, TOffsetType offset=0, size_t length=0)   Lock file. More...
  void  CFileLock::Unlock (void)   Unlock file. More...
  TFileHandle  CFileLock::GetFileHandle (void)   Return system file handle. More...
  void  CFileLock::x_Init (const char *filename, EType type, TOffsetType offset, size_t length)   Auxiliary method for constructors. More...
    CFileLock::CFileLock (const CFileLock &)   void  CFileLock::operator= (const CFileLock &)   ◆ FILENAME_MAX ◆ PATH_MAX ◆ CFileErrnoException_Base ◆ CParent [1/3] ◆ CParent [2/3] ◆ CParent [3/3] ◆ EDirRemoveMode ◆ EGetEntriesMode ◆ mode_t ◆ TCopyFlags ◆ TCreateFlags ◆ TEntries ◆ TEntry

Define a list of pointers to directory entries.

Definition at line 1759 of file ncbifile.hpp.

◆ TFileHandle ◆ TFindFiles ◆ TFlags ◆ TGetEntriesFlags ◆ TIfAbsent2 ◆ TList ◆ TMode ◆ TOffsetType [1/2] ◆ TOffsetType [2/2] ◆ TProcessingFlags

Binary OR of "EProcessingFlags".

Definition at line 754 of file ncbifile.hpp.

◆ TRemoveFlags

Flags based on TProcessingFlags.

Definition at line 757 of file ncbifile.hpp.

◆ TRenameFlags ◆ TSegments ◆ TSetModeFlags ◆ TSpecialModeBits ◆ EAccessMode

Which I/O operations permitted on the file.

Enumerator eRead 

File can be read.

eWrite 

File can be written.

eReadWrite 

File can be read and written.

Definition at line 3444 of file ncbifile.hpp.

◆ EAllowRead

Which operations to allow on temporary file.

Enumerator eAllowRead 

Allow read and write.

eWriteOnly 

Allow write only.

Definition at line 1481 of file ncbifile.hpp.

◆ EAutoRemove

Controls how temporary file is removed.

Enumerator eDoNotRemove 

Do not ever remove temporary file.

eRemoveInClose 

Remove temporary file immediately after closing its handle in Close().

eRemoveASAP 

Remove the file at the earliest possible moment (in CreateTemporary() on UNIX).

Definition at line 3498 of file ncbifile.hpp.

◆ EBackupMode

Backup modes.

Enumerator eBackup_Copy 

Copy entry.

eBackup_Rename 

Rename entry.

eBackup_Default 

Default mode.

Definition at line 667 of file ncbifile.hpp.

◆ ECompareText

Mode to compare streams in text form.

Enumerator eIgnoreEol 

Skip end-of-line characters ('\r' and '
')

Skip white spaces (in terms of isspace(), including end-of-line)

eIgnoreWs 

Definition at line 1665 of file ncbifile.hpp.

◆ ECopyFlags

Copy flags.

Note that updating modification time for directory depends on the OS. Normally it gets updated when a new directory entry is added/removed. On the other hand, changing contents of files in that directory doesn't usually affect the directory modification time.

Enumerator fCF_Overwrite 

The following flags define what to do when the destination entry already exists:

fCF_Update  fCF_Backup  fCF_Safe 

Safe copy (copy to temporary object and rename).

Be aware if used together with fCF_TopDirOnly for copying directories: if specified – full copy of the source directory will be created, after successful copying it replaces the destination. if not specified – existing destination directory will be "upgraded" with files from source directory, safe copying will be applied for every copied entry inside.

fCF_TopDirOnly 

All above flags can be applied to the top directory only (not for every file therein), to process the directory as a single entity for overwriting, updating or backing up.

fCF_EqualTypes 

If destination entry exists, it must have the same type as source.

fCF_FollowLinks 

Copy entries following their sym.links, not the links themselves.

fCF_Verify 

Verify data after copying.

fCF_PreserveOwner 

Preserve owner/group.

fCF_PreservePerm 

Preserve permissions/attributes.

fCF_PreserveTime 

Preserve date/times.

fCF_PreserveAll  fCF_Recursive 

Copy recursively (for dir only)

fCF_SkipUnsupported 

Skip all entries for which we don't have Copy() method.

fCF_Default 

Default flags.

Definition at line 531 of file ncbifile.hpp.

◆ ECreateFlags

Flags for Create()/CreatePath()

See also
Create, CreatePath
Enumerator fCreate_Default 

Default directory creation mode.

fCreate_PermByUmask 

Don't change permissions after creation, leave it for OS and umask control.

This flag have a priority over CFileAPI::SetHonorUmask(), that works with fCD_Default only.

fCreate_PermAsParent 

Use same permissions as parent directory (umask ignored)

fCreate_ErrorIfExists 

Error, if directory already exists.

All other existent entry with the same name (including symbolic links to directory) lead to an error by default.

fCreate_UpdateIfExists 

Allow to "update" permissions for already existent directory using default, umask or parent permissions as specified by previous flags.

Note: Create() only, ignored by CreatePath().

Definition at line 1921 of file ncbifile.hpp.

◆ EErrCode [1/2]

Error types that file operations can generate.

Enumerator eMemoryMap  eRelativePath  eNotExists  eFileSystemInfo  eFileIO  eTmpFile 

Definition at line 139 of file ncbifile.hpp.

◆ EErrCode [2/2]

Error types.

Enumerator eFile  eFileSystemInfo  eFileLock  eFileIO 

Definition at line 168 of file ncbifile.hpp.

◆ EFileSystemType

Unix: The path name to any file/dir withing file system.

MS Windows: The path name to any file/dir withing file system. The root directory of the disk, or UNC name (for example, \MyServer\MyShare\, C:\). The "." can be used to get disk space on current disk.

Enumerator eUnknown 

File system type could not be determined.

eADFS 

Acorn's Advanced Disc Filing System.

eAdvFS 

Tru64 UNIX Advanced File System.

eAFFS 

Amiga Fast File System.

eAFS 

AFS File System.

eAUTOFS 

Automount File System.

eBEFS 

The Be (BeOS) File System (BeFS)

eBFS 

Boot File System.

eCacheFS 

Cache File System.

eCryptFS 

eCryptfs (Enterprise Cryptographic Filesystem)

eCDFS 

ISO 9660 CD-ROM file system (CDFS/ISO9660)

eCIFS 

Common Internet File System.

eCODA 

Coda File System.

eCOH 

Coherent (System V)

eCRAMFS 

Compressed ROMFS.

eDebugFS 

Debug File System (Linux)

eDEVFS 

Device File System.

eDFS 

DCE Distributed File System (DCE/DFS)

eEFS 

The Encrypting File System (EFS) (MSWin)

eEXOFS 

EXtended Object File System (EXOFS)

eExt 

Extended file system.

eExt2 

Second Extended file system.

eExt3 

Journalled form of ext2.

eFAT 

Traditional 8.3 MSDOS-style file system.

eFAT32 

FAT32 file system.

eFDFS 

File Descriptor File System.

eFFM 

File-on-File Mounting file system.

eFFS 

Fast File System (*BSD)

eFUSE 

Filesystem in Userspace (FUSE)

eFUSE_CTL 

Fusectl (helper filesystem for FUSE)

eGFS2 

Global File System.

eGPFS 

IBM General Parallel File System.

eHFS 

Hierarchical File System.

eHFSPLUS 

Hierarchical File System.

eHPFS 

OS/2 High-Performance File System.

eHSFS 

High Sierra File System.

eJFS 

Journalling File System.

eJFFS 

Journalling Flash File System.

eJFFS2 

Journalling Flash File System v2.

eLOFS 

Loopback File System.

eMFS 

Memory File System.

eMinix 

Minix v1.

eMinix2 

Minix v2.

eMinix3 

Minix v3.

eMSFS 

Mail Slot File System.

eNCPFS 

NetWare Core Protocol File System.

eNFS 

Network File System (NFS)

eNTFS 

New Technology File System.

eOCFS2 

Oracle Cluster File System 2.

eOPENPROM 

/proc/openprom filesystem

ePANFS 

Panasas FS.

ePROC 

/proc file system

ePVFS2 

Parallel Virtual File System.

eReiserFS 

Reiser File System.

eRFS 

Remote File Share file system (AT&T RFS)

eQNX4 

QNX4 file system.

eROMFS 

ROM File System.

eSELINUX 

Security-Enhanced Linux (SELinux)

eSMBFS 

Samba File System.

eSPECFS 

SPECial File System.

eSquashFS 

Compressed read-only filesystem (Linux)

eSYSFS 

(Linux)

eSYSV2 

System V.

eSYSV4 

System V.

eTMPFS 

Virtual Memory File System (TMPFS/SHMFS)

eUBIFS 

The Unsorted Block Image File System.

eUDF 

Universal Disk Format.

eUFS 

UNIX File System.

eUFS2 

UNIX File System.

eUSBDEVICE 

USBDevice file system.

eV7 

UNIX V7 File System.

eVxFS 

VERITAS File System (VxFS)

eVZFS 

Virtuozzo File System (VZFS)

eXENIX 

Xenix (SysV) file system.

eXFS 

XFS File System.

eXIAFS 

Definition at line 2140 of file ncbifile.hpp.

◆ EFindFiles

File finding flags.

Enumerator fFF_File 

find files

fFF_Dir 

find directories

fFF_All 

find files and directories (used automatically if fFF_File or fFF_Dir has not specified)

fFF_Recursive 

descend into sub-dirs

fFF_Nocase 

case-insensitive name search

fFF_Default 

default behavior

Definition at line 3017 of file ncbifile.hpp.

◆ EFlags

Flags, used in constructors.

Default flag in each group have priority above non-default, if they are used together.

Enumerator fLockNow 

Lock file using parameters specified in constructor.

fLockLater  fAutoUnlock 

Automatically remove all obtained locks in the destructor.

Note, that you still can unlock any segment. All remaining locks will be removed in the destructor.

fNoAutoUnlock  fDefault 

Default flags.

Definition at line 3805 of file ncbifile.hpp.

◆ EGetEntriesFlags

Flags for GetEntries()

See also
GetEntries, GetEntriesPtr
Enumerator fIgnoreRecursive 

Suppress "self recursive" elements (the directories "." and "..").

fCreateObjects 

Create appropriate subclasses of CDirEntry (CFile,CDir,...), not just CDirEntry objects.

fNoCase 

Ignore upper and lower-case differences when doing a mask comparison.

Makes the mask case-insensitive.

fIgnorePath 

Return only names of entries, not their full paths.

fThrowOnError 

Throws an exceptions on error, instead of returning empty/null value.

eAllEntries 
Deprecated:
Only provided for backward compatibility.

Will be removed in the future. Do not use.

eIgnoreRecursive 
Deprecated:
Only provided for backward compatibility.

Will be removed in the future. Do not use.

Definition at line 1764 of file ncbifile.hpp.

◆ EHomeWindows

Windows specific: Historically, we try to use APPDATA% first, and use USERPROFILE% as a fallback to detect a "home" directory on Windows.

This is actually not exactly correct, and at least some users want to do it in the reverse order.

See also
GetHome
Enumerator eHomeWindows_AppData 

Try env var APPDATA% first.

eHomeWindows_UserProfile 

Try env var USERPROFILE% first.

Definition at line 1726 of file ncbifile.hpp.

◆ EIfAbsent

What IsNewer() should do if the dir entry does not exist or is not accessible.

See also
IsNewer
Enumerator eIfAbsent_Throw 

Throw an exception.

eIfAbsent_Newer 

Deem absent entry to be "newer".

eIfAbsent_NotNewer 

Deem absent entry to be "older".

Definition at line 992 of file ncbifile.hpp.

◆ EIfAbsent2

What path version of IsNewer() should do if the dir entry or specified path does not exist or is not accessible.

Default flags (0) mean throwing an exceptions if one of dir entries does not exists. But if you don't like to have an exception here, you can change IsNewer() behavior specifying flags. There are three cases: there's a problem only with the argument (HasThis-NoPath), there's a problem only with original entry (NoThis-HasPath), or there are problems with both (NoThis-NoPath). The EIfAbsent2 lets you independently select what to do in each of those scenarios: throw an exception (no flags set), return true (f*_Newer), or return false (f*_NotNewer).

See also
IsNewer
Enumerator fHasThisNoPath_Newer  fHasThisNoPath_NotNewer  fNoThisHasPath_Newer  fNoThisHasPath_NotNewer  fNoThisNoPath_Newer  fNoThisNoPath_NotNewer 

Definition at line 1037 of file ncbifile.hpp.

◆ EIfEmptyPath

What GetDir() should return if the dir entry does not contain path.

See also
GetDir
Enumerator eIfEmptyPath_Empty 

Return empty string.

eIfEmptyPath_Current 

Return current dir like "./".

Definition at line 329 of file ncbifile.hpp.

◆ EIfExists

What to do if stream already exists in the AsInputFile/AsOutputFile.

Enumerator eIfExists_Throw 

You can make call of AsInputFile/AsOutputFile only once, on each following call throws CFileException exception.

eIfExists_Reset 

Delete previous stream and return reference to new object.

Invalidate all previously returned references.

eIfExists_ReturnCurrent 

Return reference to current stream, create new one if it does not exists yet.

Definition at line 2384 of file ncbifile.hpp.

◆ EMemMapAdvise

What type of data access pattern will be used for mapped region.

Advises the VM system that the a certain region of user mapped memory will be accessed following a type of pattern. The VM system uses this information to optimize work with mapped memory.

NOTE: Works on UNIX platform only.

See also
EMemoryAdvise, MemoryAdvise
Enumerator eMMA_Normal  eMMA_Random  eMMA_Sequential  eMMA_WillNeed  eMMA_DontNeed  eMMA_DoFork  eMMA_DontFork  eMMA_Mergeable  eMMA_Unmergeable 

Definition at line 2480 of file ncbifile.hpp.

◆ EMemMapProtect

Which operations are permitted in memory map file.

Enumerator eMMP_Read 

Data can be read.

eMMP_Write 

Data can be written.

eMMP_ReadWrite 

Data can be read and written.

Definition at line 2440 of file ncbifile.hpp.

◆ EMemMapShare

Whether to share changes or not.

Enumerator eMMS_Shared 

Changes are shared.

eMMS_Private 

Changes are private (write do not change file)

Definition at line 2447 of file ncbifile.hpp.

◆ EMode

Directory entry access permissions.

Enumerator fExecute 

Execute / List(directory) permission.

fWrite 

Write permission.

fRead 

Read permission.

fDefault 

Special flag: ignore all other flags, use current default mode.

fDefaultDirUser 

Default user permission for a dir.

fDefaultDirGroup 

Default group permission for a dir.

fDefaultDirOther 

Default other permission for a dir.

fDefaultUser 

Default user permission for a file.

fDefaultGroup 

Default group permission for a file.

fDefaultOther 

Default other permission for a file.

Definition at line 1151 of file ncbifile.hpp.

◆ EModeRelative

Relative permissions change modes.

Can be combined with TMode or TSpecialModeBits. Only one of these flags is allowed for each mode.

Enumerator fModeAdd 

Adds the argument permission mode to the entry's current mode.

fModeRemove 

Removes the argument permission mode from the entry's current mode.

fModeNoChange 

Do not change permission mode.

Definition at line 1185 of file ncbifile.hpp.

◆ EModeStringFormat

Permission mode string format.

See also
StringToMode, ModeToString
Enumerator eModeFormat_Octal 

Octal format ("664")

eModeFormat_Symbolic 

Shell symbolic format ("u=rwx,g=rwx,o=rx")

eModeFormat_List 

Shell list 'ls -l' like format ("rwxrwxrwx")

eModeFormat_Default 

Default mode.

Definition at line 1353 of file ncbifile.hpp.

◆ EOpenMode [1/2]

Memory file open mode.

Enumerator eCreate 

Create new file or rewrite existent with zeros.

eOpen 

Open existent file, throw exception otherwise.

eExtend 

Extend file size with zeros if it exist, throw exception otherwise.

eDefault 

Default open mode.

Definition at line 2453 of file ncbifile.hpp.

◆ EOpenMode [2/2]

File open mode.

Enumerator eCreate 

Create a new file, or truncate an existing one.

Create a new file, or fail if the file already exists.

eCreateNew 

Open an existing file, or fail if the file does not exist.

eOpen 

Open an existing file, or create a new one.

eOpenAlways  eTruncate 

Open an existing file and truncate its size to 0.

Fail if the file does not exist.

Definition at line 3429 of file ncbifile.hpp.

◆ EPositionMoveMethod

Which starting point to use for the moves of the file pointer.

Enumerator eBegin 

Absolute position from beginning of the file.

eCurrent 

Relative to current position.

eEnd 

The starting point is the current EOF position.

Definition at line 3470 of file ncbifile.hpp.

◆ EProcessingFlags

Entries processing flags.

Note
Different methods use different sets of flags, and ignore all other. Refer to method descriptions for details.
Enumerator fEntry 

Current entry only.

fDir_Self 

Top directory entry.

fDir_Files 

Non-directory entries.

fDir_Subdirs 

Subdirectory entries (non recursive)

fDir_Recursive 

Add a recursion.

fDir_All 

Mask to check what should be processed in a directory.

fIgnoreMissing 

Ignore missed entries.

fProcessAll 

Process all entries.

eOnlyEmpty 

Directory entry only, no other files or subdirectories.

eEntryOnly  eTopDirOnly 

All files in the top directory only, no subdirectories and any files in them.

eNonRecursive 

All files and subdirectories in the top directory, but no files in subdirectories.

eRecursive 

Process all files and subdirectories recursively.

Stop processing on a first error.

eRecursiveStopOnErrors  eRecursiveIgnoreMissing 

Same as eRecursive, but do not report an error for disappeared entries (e.g.

if the same directory is being removed in a parallel thread for example).

eRecursiveNotStopOnErrors 

Same as eRecursiveIgnoreMissing, but process all possible entries.

Do not break processing if it cannot ptocess some entries due permission or other errors.

Definition at line 704 of file ncbifile.hpp.

◆ ERelativeToWhat

How to interpret relative paths.

See also
CreateAbsolutePath
Enumerator eRelativeToCwd 

Relative to the current working directory.

eRelativeToExe 

Relative to the executable's location.

If the executable was invoked via a symlink, search the directory containing the symlink before the directory (if different) containing the actual binary.

Definition at line 434 of file ncbifile.hpp.

◆ ERemoveMode

What to do with the file on object destruction.

Enumerator eRemove 

Remove file.

eNoRemove 

Do not remove file.

Definition at line 2365 of file ncbifile.hpp.

◆ ERenameFlags

Rename flags.

Enumerator fRF_Overwrite 

Remove destination if it exists.

fRF_Update 

Update older entries only (compare modification times).

fRF_Backup 

Backup destination if it exists before renaming.

fRF_EqualTypes 

If destination entry exists, it must have the same type as source.

fRF_FollowLinks 

Rename entries following sym.links, not the links themselves.

fRF_Default 

Default flags.

Definition at line 610 of file ncbifile.hpp.

◆ EShareMode

Sharing mode for opened file.

Note
If OS does not support sharing mode for files, that it will be ignored. But you can use CFileLock to lock a file or its part.
See also
CFileLock
Enumerator eShareRead 

Enables subsequent open operations on the file that request read access.

Otherwise, other processes cannot open the file for reading.

eShareWrite 

Enables subsequent open operations on the file that request write access.

Otherwise, other processes cannot open the file for writing.

eShare 

Combines both eShareRead and eShareWrite modes.

eExclusive 

Open file for exclusive access.

Disables any subsequent open operations on the file.

Definition at line 3455 of file ncbifile.hpp.

◆ ESort

Sorting mode.

Enumerator ePath 

Sort by full path (default)

eDir 

Directory name.

eName 

Full file name.

eBase 

Base file name.

eExt 

File extension.

Definition at line 3395 of file ncbifile.hpp.

◆ ESpecialModeBits Enumerator fSticky  fSetGID  fSetUID 

Definition at line 1175 of file ncbifile.hpp.

◆ ETextBinary

What type of temporary file to create.

Enumerator eText 

Create text file.

eBinary 

Create binary file.

Definition at line 1475 of file ncbifile.hpp.

◆ ETmpFileCreationMode

Temporary file creation mode.

Enumerator eTmpFileCreate 

Create empty file for each GetTmpName* call.

eTmpFileGetName 

Get name of the file only.

Definition at line 1414 of file ncbifile.hpp.

◆ EType [1/2]

Directory entry type.

Enumerator eFile 

Regular file.

eDir 

Directory.

ePipe 

Pipe.

eLink 

Symbolic link (UNIX only)

eSymLink 

Symbolic link (UNIX only)

eSocket 

Socket (UNIX only)

eDoor 

Door (UNIX only)

eBlockSpecial 

Block special (UNIX only)

eCharSpecial 

Character special.

eUnknown 

Unknown type.

Definition at line 783 of file ncbifile.hpp.

◆ EType [2/2]

Type of file lock.

Shared lock allows all processes to read from the locked portion of the file, while denying to write into it. Exclusive lock denies other processes both read and write to the locked portion of the file, while allowing the locking process to read or write through a specified or obtained file handle.

Enumerator eShared 

"read" lock.

eExclusive 

"write" lock.

Definition at line 3796 of file ncbifile.hpp.

◆ EWho

Which default mode: user, group, or other.

Used as an index into an array that contains default mode values; so there is no "fDefault" as an enumeration value for EWho here!

Enumerator eUser 

User mode.

eGroup 

Group mode.

eOther 

Other mode.

eSpecial 

Special bits.

Definition at line 1571 of file ncbifile.hpp.

◆ Add() [1/2] ◆ Add() [2/2] ◆ AddTrailingPathSeparator()

Add trailing path separator, if needed.

Definition at line 455 of file ncbifile.cpp.

References ALL_SEPARATORS, CDirEntry::GetPathSeparator(), len, and NPOS.

Referenced by CMsvcPrjProjectContext::AdditionalIncludeDirectories(), CMsvcPrjProjectContext::AdditionalLibraryDirectories(), BDB_CreateEnv(), CFastaOstreamComp::CFastaOstreamComp(), CMsvcPrjGeneralContext::CMsvcPrjGeneralContext(), CMsvcPrjProjectContext::CMsvcPrjProjectContext(), CDirEntry::ConcatPath(), CQueueDataBase::CQueueDataBase(), SMakeProjectT::CreateIncludeDirs(), CDirEntry::CreateRelativePath(), CFileIO::CreateTemporary(), SAsnProjectMultipleT::DoCreate(), FindFilesInDir(), CProjBulderApp::GenerateMsvcProjects(), CProjBulderApp::GenerateUnixProjects(), CProjBulderApp::GetBuildDir(), CDir::GetEntriesPtr(), CDir::GetHome(), CProjBulderApp::GetProjectTreeInfo(), CProjBulderApp::GetProjectTreeRoot(), CMsvcMetaMakefile::GetUsePchThroughHeader(), CProjBulderApp::GetUtilityProjectsDir(), CProjBulderApp::GetUtilityProjectsSrcDir(), IdentifySlnGUID(), CProjectsLstFileFilter::InitFromString(), CNetScheduleServer::InitNodeID(), CConfigurationImpl< ConfTrait >::IntermediateDirectory(), CDirEntry::MakePath(), SGridWorkerNodeImpl::OfflineRun(), CBDB_Cache::Open(), CBDB_Volumes::Open(), CBDB_Cache::OpenReadOnly(), ParentDir(), CProjBulderApp::ParseArguments(), CTbl2AsnApp::Run(), CTAbleValApp::Run(), s_InitializeECNumberMaps(), s_ToArchiveName(), CBDB_Cache::SameCacheParams(), CArchive::SetBaseDir(), CBDB_ExtBlobStore< TBV >::SetStoreAttrDir(), CBDB_ExtBlobStore< TBV >::SetStoreDataDir(), CBDB_Cache::Verify(), CProjBulderApp::VerifyArguments(), and x_Glob().

◆ AsInputFile() ◆ AsOutputFile() ◆ Backup()

Backup an entry.

Create a copy of the current entry with the same name and an extension specified by SetBackupSuffix(). By default this extension is ".bak". Backups can be automatically created in 'copy' or 'rename' operations. If an entry with the name of the backup already exists, then it will be deleted (if possible). The current entry name components are changed to reflect the backed up copy.

Parameters
suffix Extension to add to backup entry. If empty, GetBackupSuffix() is be used. mode Backup mode. Specifies what to do, copy the entry or just rename it. copyflags Flags to copy the entry. Used only if mode is eBackup_Copy, copybufsize Buffer size to use while copying the file contents. Used only if 'mode' is eBackup_Copy,
Returns
TRUE if backup created successfully; FALSE otherwise.
See also
EBackupMode

Definition at line 2634 of file ncbifile.cpp.

References _TROUBLE, CDirEntry::Copy(), CDirEntry::DeleteTrailingPathSeparator(), CDirEntry::eBackup_Copy, CDirEntry::eBackup_Rename, CDirEntry::fCF_Backup, CDirEntry::fCF_Overwrite, CDirEntry::fCF_TopDirOnly, CDirEntry::fCF_Update, flags, CDirEntry::fRF_Overwrite, CDirEntry::GetBackupSuffix(), CDirEntry::GetPath(), CDirEntry::Rename(), and string.

Referenced by CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CDirEntry::Rename(), and CArchive::x_ExtractEntry().

◆ CDir() [1/3] ◆ CDir() [2/3] ◆ CDir() [3/3] ◆ CDirEntry() [1/3] ◆ CDirEntry() [2/3] ◆ CDirEntry() [3/3] CDirEntry::CDirEntry ( void  ) inline ◆ CFile() [1/3] ◆ CFile() [2/3] ◆ CFile() [3/3] ◆ CFileIO() [1/2] ◆ CFileIO() [2/2] CFileIO::CFileIO ( void  ) ◆ CFileLock() [1/4] ◆ CFileLock() [2/4] ◆ CFileLock() [3/4] ◆ CFileLock() [4/4] ◆ CFileReader() [1/4] ◆ CFileReader() [2/4] ◆ CFileReader() [3/4] ◆ CFileReader() [4/4] ◆ CFileReaderWriter() [1/4] ◆ CFileReaderWriter() [2/4] ◆ CFileReaderWriter() [3/4] ◆ CFileReaderWriter() [4/4] CFileReaderWriter::CFileReaderWriter ( TFileHandle  handle ) ◆ CFileReaderWriter_Base() [1/2] ◆ CFileReaderWriter_Base() [2/2] CFileReaderWriter_Base::CFileReaderWriter_Base ( void  ) inline ◆ CFileWriter() [1/4] ◆ CFileWriter() [2/4] ◆ CFileWriter() [3/4] ◆ CFileWriter() [4/4] ◆ CFindFileNamesFunc() ◆ CheckAccess() bool CDirEntry::CheckAccess ( TMode  access_mode ) const

Check access rights.

Use effective user ID (or process owner) to check the entry for accessibility accordingly to specified mask.

Note
This method may not work correctly On MS-Windows:
Using CheckAccess() to check if a user is authorized to e.g. open a file before actually doing so creates a security hole, because the user might exploit the short time interval between checking and opening the file to manipulate it. Always is better to try to open a file with necessary permissions and check result.
Parameters
access_mode Checked access mode (any combination of fRead/fWrite/fExecute).
Returns
TRUE if specified permissions granted, FALSE otherwise (also returns FALSE if the file doesn't exists or an error occurs).
See also
GetMode

Definition at line 1720 of file ncbifile.cpp.

References CDirEntry::fExecute, CDirEntry::fRead, CDirEntry::fWrite, CWinSecurity::GetFilePermissions(), CDirEntry::GetPath(), mask, s_CheckAccessPath(), and CNcbiError::SetFromErrno().

Referenced by CBuildDatabase::CreateDirectories(), GetIndexSuperHeader(), CwxSavePdfBaseDlg::OnSaveClick(), CwxExportAlnmultiImgDlg::OnSaveClick(), CwxExportVectorImageDlg::OnSaveClick(), SGridWorkerNodeImpl::Run(), and CAsn2FastaApp::x_ProcessISubdirectory().

◆ Close() void CFileIO::Close ( void  )

Close file.

Definition at line 6638 of file ncbifile.cpp.

References _T_XCSTRING, close(), CFileIO::eDoNotRemove, kInvalidHandle, CFileIO::m_AutoRemove, CFileIO::m_Handle, CFileIO::m_Pathname, NCBI_THROW, and NcbiSys_remove.

Referenced by CNetCacheReader::Close(), CVCFVariantList::CVCFVariantList(), NVcfUtil::DeserializeColumn(), CDirEntry::GetTmpNameEx(), CArchiveMemory::Load(), NVcfUtil::PrintToFile(), CArchiveMemory::Save(), CFileIO::SetFileHandle(), CColumnarVCFReaderApp::x_ReadVCFBlob(), and CFileIO::~CFileIO().

◆ CMemoryFile() [1/2] ◆ CMemoryFile() [2/2]

Constructor.

Initialize memory mapping for file "file_name".

Parameters
filename Name of file to map to memory. protect_attr Specify operations permitted on memory mapped file. share_attr Specify if change to memory mapped file can be shared or not. offset The file offset where mapping is to begin. length Number of bytes to map. The value 0 means that all file size will be mapped. mode File open mode. max_file_len The size of created file if 'mode' parameter is eCreate or eExtend. File will be never truncated if open mode is eExtend and real file size is more that specified maximum length.
See also
EMemMapProtect, EMemMapShare, EOpenMode
EMemMapProtect, EMemMapShare, Map
Note
MS Windows: If file is open in eMMP_Read mode with eMMS_Private protection, that memory pages will be mapped in exclusive mode, and any other process cannot access the same file for writing.

Definition at line 6107 of file ncbifile.cpp.

References SMemoryFileHandle::hMap, kInvalidHandle, CMemoryFileMap::m_Handle, CMemoryFile::Map(), and offset.

◆ CMemoryFile_Base() CMemoryFile_Base::CMemoryFile_Base ( void  ) ◆ CMemoryFileMap() [1/2] ◆ CMemoryFileMap() [2/2]

Constructor.

Initialize the memory mapping on file "file_name".

Parameters
filename Name of file to map to memory. protect_attr Specify operations permitted on memory mapped file. share_attr Specify if change to memory mapped file can be shared or not. mode File open mode. max_file_len The size of created file if 'mode' parameter is eCreate or eExtend. File will be never truncated if open mode is eExtend and real file size is more that specified maximum length.
See also
EMemMapProtect, EMemMapShare, EOpenMode
Note
MS Windows: If file is open in eMMP_Read mode with eMMS_Private protection, that memory pages will be mapped in exclusive mode, and any other process cannot access the same file for writing.

Definition at line 5726 of file ncbifile.cpp.

References CMemoryFile_Base::eCreate, CMemoryFile_Base::eExtend, CMemoryFileMap::GetFileSize(), SMemoryFileHandle::hMap, kInvalidHandle, CMemoryFileMap::m_Attrs, CMemoryFileMap::m_FileName, CMemoryFileMap::m_Handle, NCBI_THROW, NStr::ReplaceInPlace(), s_TranslateAttrs(), SMemoryFileHandle::sFileName, CMemoryFileMap::x_Create(), CMemoryFileMap::x_Extend(), and CMemoryFileMap::x_Open().

◆ CMemoryFileSegment() [1/2] ◆ CMemoryFileSegment() [2/2]

Constructor.

Maps a view of the file, represented by "handle", into the address space of the calling process.

Parameters
handle Handle to view of the mapped file. attr Specify operations permitted on memory mapped region. offset The file offset where mapping is to begin. Cannot accept values less than 0. length Number of bytes to map. The parameter value should be more than 0.
See also
EMemMapProtect, EMemMapShare, GetPtr, GetSize, GetOffset

Definition at line 5599 of file ncbifile.cpp.

References CSystemInfo::GetVirtualMemoryAllocationGranularity(), SMemoryFileHandle::hMap, NStr::Int8ToString(), CMemoryFileSegment::m_DataPtr, CMemoryFileSegment::m_DataPtrReal, CMemoryFileSegment::m_Length, CMemoryFileSegment::m_LengthReal, CMemoryFileSegment::m_Offset, CMemoryFileSegment::m_OffsetReal, SMemoryFileAttrs::map_access, SMemoryFileAttrs::map_protect, NCBI_THROW, NcbiSys_strerror, SMemoryFileHandle::sFileName, and WIN_LAST_ERROR_STR.

◆ Compare()

Compare files contents in binary form.

Parameters
file File name to compare. buf_size Size of buffer to read file. Zero value means using default buffer size.
Returns
TRUE if files content is equal; FALSE otherwise.

Definition at line 3459 of file ncbifile.cpp.

References CNcbiError::eIoError, CFileIO_Base::eOpen, CNcbiError::eOperationNotPermitted, CFileIO_Base::eRead, CFileIO::GetFileSize(), CDirEntry::GetPath(), kDefaultBufferSize, LOG_ERROR_NCBI, memmove, min(), n, CFileIO::Open(), CFileIO::Read(), and x_size().

Referenced by CFile::Copy().

◆ CompareTextContents() ◆ ConcatPath()

Concatenate two parts of the path for the current OS.

Note that the arguments must be OS-specific.

Parameters
first First part of the path which can be either absolute or relative. second Second part of the path must always be relative.
Returns
The concatenated path.

Definition at line 776 of file ncbifile.cpp.

References CDirEntry::AddTrailingPathSeparator(), DIR_SEPARATOR, first(), and NStr::TruncateSpaces().

Referenced by CSimpleMakeFileContents::SParser::AcceptLine(), CMsvcPrjProjectContext::AdditionalIncludeDirectories(), CMsvcPrjProjectContext::AdditionalLibraryDirectories(), CMsvcPrjProjectContext::AdditionalLinkerOptions(), CMakeProject::AddSourceFile(), CMsvcConfigure::AnalyzeDefines(), BOOST_AUTO_TEST_CASE(), CProjectTreeBuilder::BuildOneProjectTree(), CMsvcCombinedProjectMakefile::CMsvcCombinedProjectMakefile(), CMsvcPrjGeneralContext::CMsvcPrjGeneralContext(), CMsvcPrjProjectContext::CMsvcPrjProjectContext(), CMsvcSite::CMsvcSite(), CMsvcPrjFilesCollector::CollectExtra(), CMsvcPrjFilesCollector::CollectResources(), CMsvcPrjFilesCollector::CollectSources(), CDirEntry::CreateAbsolutePath(), CProjBulderApp::CreateCheckList(), CreateConfigurableFile(), CreateDllBuildTree(), CProjBulderApp::CreateFeaturesAndPackagesFiles(), SMakeProjectT::CreateFullPathes(), SMakeProjectT::CreateIncludeDirs(), SMakeProjectT::CreateMakeAppLibFileName(), SAsnProjectSingleT::DoCreate(), SAsnProjectMultipleT::DoCreate(), SAppProjectT::DoCreate(), SLibProjectT::DoCreate(), SMsvcProjectT::DoCreate(), CIgBlastArgs::ExtractAlgorithmOptions(), CProjBulderApp::FindDepGraph(), CCodeGenerator::GenerateModuleCPP(), CProjBulderApp::GenerateMsvcProjects(), CProjBulderApp::GenerateSummary(), CProjBulderApp::GenerateUnixProjects(), NASNCacheFileName::GetBDBIndex(), CProjBulderApp::GetBuildDir(), CProjBulderApp::GetConfigureMacro(), CMsvcProjectMakefile::GetCustomBuildInfo(), CMsvcSite::GetLibChoiceIncludes(), CProjBulderApp::GetMetaMakefile(), CMsvcPrjProjectContext::GetMsvcProjectMakefile(), CProjItem::GetPath(), CProjBulderApp::GetProjectTreeInfo(), CProjBulderApp::GetProjectTreeRoot(), SMakeProjectT::GetProjType(), NASNCacheFileName::GetSeqIdChunk(), CMsvc7RegSettings::GetTopBuilddir(), CMsvcMetaMakefile::GetUsePchThroughHeader(), CProjBulderApp::GetUtilityProjectsDir(), CProjBulderApp::GetUtilityProjectsSrcDir(), CPhyloPdfGrabber::GrabImages(), IImageGrabber::GrabImages(), CPdfGrabber::GrabImages(), CSVGGrabber::GrabImages(), IdentifySlnGUID(), CTestBMApp::Init(), CConfigurationImpl< ConfTrait >::IntermediateDirectory(), CMsvcSite::IsLibOk(), IsProducedByDatatool(), CDataToolGeneratedSrc::LoadFrom(), CwxSavePdfBaseDlg::OnSaveClick(), CwxExportAlnmultiImgDlg::OnSaveClick(), CwxExportVectorImageDlg::OnSaveClick(), CwxExportVectorImageDlg::OnTimer(), CProjBulderApp::ParseArguments(), CProjectTreeBuilder::ProcessDir(), CProjBulderApp::ProcessLocationMacros(), CFastCgiMTSampleRequestProcessor::ProcessRequest(), CProjBulderApp::RegisterProjectWatcher(), CProjBulderApp::ReportGeneratedFiles(), CProjSRCResolver::ResolveTo(), CSplignApp::Run(), CLDS2IndexerApplication::Run(), CDemoApp::Run(), CProjBulderApp::Run(), s_AddProjItemToDll(), s_CollectDatatoolIds(), s_ConvertRelativePaths(), s_CreateThirdPartyLibsInstallMakefile(), s_GetMakefileIncludes(), s_InitalizeDllProj(), CChunkFile::s_MakeChunkFileName(), s_ProcessParameters(), s_ResetLibInstallKey(), s_SourceFileExists(), s_StoreStartupParams(), s_ToFilesystemPath(), s_WriteBuildOrder(), CNetScheduleJobSerializer::SaveJobInput(), CNetScheduleJobSerializer::SaveJobOutput(), SetLogFileName(), CDiagContext::SetupDiag(), sUpdateCase(), CNcbiEncrypt::sx_InitKeyMap(), CProjBulderApp::VerifyArguments(), CMakeNode::Write(), CMakeProject::Write(), CMsvcConfigure::WriteBuildVer(), CMsvcConfigure::WriteExtraDefines(), CPhyloPdfGrabber::x_BeginCaptures(), CPdfGrabber::x_BeginCaptures(), CSVGGrabber::x_BeginCaptures(), CDumpASNIndex::x_CreateRootDir(), CDownloadJob::x_DownloadAndExtract(), CArchive::x_ExtractEntry(), CMetaRegistry::x_FindRegistry(), CDll::x_Init(), CRegexpTemplateTester::x_Op_Include(), CTar::x_ReadEntryInfo(), CArchive::x_RestoreAttrs(), CSaveHitMatrixPdfDlg::x_SavePdf(), CSaveTreePdfDlg::x_SavePdf(), CTestBMApp::x_Serialize(), CBLASTDatabases::x_UpdateDbMap(), and CDumpASNIndex::x_WriteHeader().

◆ ConcatPathEx()

Concatenate two parts of the path for any OS.

Note that the arguments are not OS-specific.

Parameters
first First part of the path which can be either absolute or relative. second Second part of the path must always be relative.
Returns
The concatenated path.

Definition at line 791 of file ncbifile.cpp.

References ALL_OS_SEPARATORS, CTempString::find_last_of(), first(), CDirEntry::GetPathSeparator(), kEmptyStr, NPOS, CTempString::size(), string, CTempString::substr(), and NStr::TruncateSpaces_Unsafe().

Referenced by CMacroFlowEditor::CopyDefaultLibrary(), CProjectsLstFileFilter::InitFromFile(), s_ExpandProjectFolder(), s_UpdateMacros(), and NMacroStats::SaveScriptToFile().

◆ ConvertToOSPath()

Convert "path" on any OS to the current OS-dependent path.

Converts related paths, normalizes absolute.

See also
IsAbsolutePath, NormalizePath

Definition at line 745 of file ncbifile.cpp.

References DIR_CURRENT, DIR_PARENT, DIR_SEPARATOR, NStr::EndsWith(), i, CDirEntry::IsAbsolutePathEx(), and CDirEntry::NormalizePath().

Referenced by BOOST_AUTO_TEST_CASE(), CProjectTreeBuilder::BuildOneProjectTree(), CDiagFileHandleHolder::CDiagFileHandleHolder(), CMsvcSite::CMsvcSite(), CProjBulderApp::FindDepGraph(), CCodeGenerator::GenerateFileList(), CMsvcMetaMakefile::GetPchInfo(), CProjBulderApp::GetProjectTreeInfo(), CProjBulderApp::GetRegSettings(), CProjectsLstFileFilter::InitFromFile(), CHugeFileDemoApp::Run(), and CMsvcConfigure::WriteBuildVer().

◆ Copy() [1/4]

Copy the entry to a location specified by "new_path".

The Copy() method must be overloaded in derived classes that support copy operation.

Parameters
new_path New path/name of an entry. flags Flags specifying how to copy the entry. buf_size Buffer size to use while copying the file contents. Zero value means using default buffer size. This parameter have advisory status and can be override, depends from OS and size of copied file.
Returns
TRUE if the operation was completed successfully; FALSE, otherwise.
See also
CFile::Copy, CDir::Copy, CLink::Copy, CopyToDir

Reimplemented in CSymLink, CDir, and CFile.

Definition at line 2428 of file ncbifile.cpp.

References CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CDirEntry::eDir, CDirEntry::eFile, eFollowLinks, eIgnoreLinks, CDirEntry::eLink, CNcbiError::eNoSuchFileOrDirectory, CNcbiError::eNotSupported, CDirEntry::eUnknown, F_ISSET, CDirEntry::fCF_FollowLinks, CDirEntry::fCF_SkipUnsupported, flags, CDirEntry::GetPath(), CDirEntry::GetType(), and CNcbiError::Set().

Referenced by CDirEntry::Backup(), BOOST_AUTO_TEST_CASE(), CDirEntry::CopyToDir(), CBlastdbConvertApp::Run(), sRunTest(), and CTar::x_ExtractEntry().

◆ Copy() [2/4]

Copy a file.

Parameters
new_path Target entry path/name. flags Flags specified how to copy entry. buf_size Size of buffer to read file. Zero value means using default buffer size.
Returns
TRUE if operation successful; FALSE, otherwise.
See also
TCopyFlags

Reimplemented from CDirEntry.

Definition at line 3334 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::Backup(), CFile::Compare(), CDirEntry::DereferenceLink(), CDirEntry::eBackup_Rename, CDirEntry::eFile, CNcbiError::eIoError, CNcbiError::eOperationNotPermitted, CDirEntry::eUnknown, F_ISSET, FALSE, CDirEntry::fCF_Backup, CDirEntry::fCF_EqualTypes, CDirEntry::fCF_FollowLinks, CDirEntry::fCF_Overwrite, CDirEntry::fCF_PreserveAll, CDirEntry::fCF_PreservePerm, CDirEntry::fCF_PreserveTime, CDirEntry::fCF_Safe, CDirEntry::fCF_Update, CDirEntry::fCF_Verify, flags, CDirEntry::fRF_Overwrite, CDirEntry::GetBackupSuffix(), CDir::GetCwd(), CDirEntry::GetPath(), CDirEntry::GetTmpNameEx(), CDirEntry::GetType(), CDirEntry::IsIdentical(), CDirEntry::IsNewer(), kTmpSafeSuffix, LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, LOG_ERROR_WIN, CDirEntry::Remove(), CDirEntry::RemoveEntry(), CDirEntry::Rename(), CDirEntry::Reset(), s_CopyAttrs(), CDirEntry::SplitPath(), and tmp.

Referenced by CDirEntry::Copy(), CSymLink::Copy(), CMacroFlowEditor::CopyDefaultLibrary(), PostProcessFile(), sRunTest(), and CMsvcConfigure::WriteBuildVer().

◆ Copy() [3/4]

Copy directory.

Parameters
new_path New path/name for entry. flags Flags specified how to copy directory. buf_size Size of buffer to read file. Zero value means using default buffer size.
Returns
TRUE if operation successful; FALSE, otherwise.
See also
CDirEntry::TCopyFlags, CDirEntry::Copy, CFile::Copy

Reimplemented from CDirEntry.

Definition at line 4187 of file ncbifile.cpp.

References CDirEntry::Backup(), CDirEntry::CopyToDir(), CDir::CreatePath(), CDirEntry::DereferenceLink(), CDirEntry::eBackup_Rename, CDirEntry::eDir, eFollowLinks, eIgnoreLinks, CNcbiError::eNoSuchFileOrDirectory, CNcbiError::eOperationNotPermitted, CDirEntry::eUnknown, F_ISSET, CDirEntry::fCF_Backup, CDirEntry::fCF_EqualTypes, CDirEntry::fCF_FollowLinks, CDirEntry::fCF_Overwrite, CDirEntry::fCF_PreserveAll, CDirEntry::fCF_Recursive, CDirEntry::fCF_Safe, CDirEntry::fCF_TopDirOnly, CDirEntry::fCF_Update, CDirEntry::fDefault, flags, CDirEntry::fRF_Overwrite, CDirEntry::GetBackupSuffix(), CDir::GetCwd(), CDir::GetEntriesPtr(), CDirEntry::GetPath(), CDirEntry::GetTmpNameEx(), CDirEntry::GetType(), CDirEntry::IsDir(), CDirEntry::IsIdentical(), CDirEntry::IsNewer(), ITERATE, kEmptyStr, kTmpSafeSuffix, LOG_ERROR, LOG_ERROR_NCBI, NCBI, NCBI_PARAM_TYPE, CDir::Remove(), CDirEntry::Rename(), CDirEntry::Reset(), s_CopyAttrs(), CDir::SetMode(), CDirEntry::SplitPath(), and tmp.

Referenced by CDirEntry::Copy(), and CSymLink::Copy().

◆ Copy() [4/4]

Copy link.

Parameters
new_path Target entry path/name. flags Flags specified how to copy entry. buf_size Size of buffer to read file. Zero value means using default buffer size.
Returns
TRUE if operation successful; FALSE, otherwise.
See also
CDirEntry::TCopyFlags, CDirEntry::Copy, Create

Reimplemented from CDirEntry.

Definition at line 4597 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::Backup(), buf, CDirEntry::CDirEntry(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CDirEntry::eBackup_Rename, CDirEntry::eDir, CDirEntry::eFile, eFollowLinks, eIgnoreLinks, CNcbiError::eInvalidArgument, CNcbiError::eIoError, CDirEntry::eLink, CNcbiError::eNoSuchFileOrDirectory, CNcbiError::eOperationNotPermitted, CDirEntry::eUnknown, F_ISSET, CDirEntry::fCF_Backup, CDirEntry::fCF_EqualTypes, CDirEntry::fCF_FollowLinks, CDirEntry::fCF_Overwrite, CDirEntry::fCF_PreserveAll, CDirEntry::fCF_Safe, CDirEntry::fCF_Update, flags, CDirEntry::fRF_Overwrite, CDirEntry::GetBackupSuffix(), CDir::GetCwd(), CDirEntry::GetPath(), CDirEntry::GetTmpNameEx(), CDirEntry::GetType(), int, CDirEntry::IsIdentical(), CDirEntry::IsNewer(), kTmpSafeSuffix, len, LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, PATH_MAX, CDirEntry::Remove(), CDirEntry::Rename(), CDirEntry::Reset(), s_CopyAttrs(), CDirEntry::SplitPath(), and tmp.

Referenced by CDirEntry::Copy(), and CSymLink::Copy().

◆ CopyToDir() ◆ Create() [1/2]

Create symbolic link.

Parameters
path Path to some entry that link will be pointed to.
Returns
TRUE if operation successful; FALSE, otherwise. Return FALSE also if link already exists.

Definition at line 4572 of file ncbifile.cpp.

References _T_XCSTRING, buf, CNcbiError::eNotSupported, CDirEntry::GetPath(), int, len, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, PATH_MAX, and util::strcmp().

Referenced by CTar::x_ExtractEntry().

◆ Create() [2/2]

Create the directory using "dirname" passed in the constructor.

Default directory creation mode:

Definition at line 4069 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::CreateAbsolutePath(), CDirEntry::DeleteTrailingPathSeparator(), CNcbiError::eInvalidArgument, ctll::empty(), CNcbiError::eNoSuchFileOrDirectory, F_ISSET, flags, CDirEntry::GetDefaultModeT(), CDirEntry::GetDir(), CDirEntry::GetPath(), LOG_ERROR_ERRNO, LOG_ERROR_NCBI, NcbiSys_stat, s_DirCreate(), and st().

Referenced by BDB_CreateEnv(), CMacroFlowEditor::CopyDefaultLibrary(), CAgpFastaComparator::CTmpSeqVecStorage::CTmpSeqVecStorage(), CBDB_Cache::Open(), CSQLITE3_Cache::Open(), CBDB_Volumes::Open(), CBDB_ExtBlobStore< TBV >::Open(), CSplignApp::Run(), CTbl2AsnApp::Run(), CTAbleValApp::Run(), CSeqAnnotSplicerApp::Run(), s_EnsureDirExist(), NMacroStats::SaveScriptToFile(), CBDB_Env::SetLogDir(), CSplitCacheApp::SetupCache(), CAsnvalApp::ValidateOneDirectory(), CQueueDataBase::x_CreateSpaceReserveFile(), CQueueDataBase::x_Dump(), and CQueueDataBase::x_Open().

◆ CreateAbsolutePath() [1/2] ◆ CreateAbsolutePath() [2/2]

Get an absolute path from some, possibly relative, path.

Parameters
path Path to resolve, in native syntax; returned as is if absolute. rtw Starting point for relative path resolution – the current directory by default, but looking alongside the executable is also an option.
Returns
Corresponding absolute path. May be the original string (if already absolute) or the starting point indicated by rtw (if the input was empty or ".").
See also
ERelativeToWhat, CreateAbsolutePath

Definition at line 665 of file ncbifile.cpp.

References CDirEntry::CDirEntry(), CDirEntry::ConcatPath(), DISK_SEPARATOR, CNcbiApplicationAPI::eFullName, CNcbiApplicationAPI::eRealName, CDirEntry::eRelativeToCwd, CDirEntry::eRelativeToExe, CDirEntry::Exists(), CNcbiApplicationAPI::GetAppName(), CDir::GetCwd(), CDirEntry::IsAbsolutePath(), NCBI_THROW, CDirEntry::NormalizePath(), NPOS, result, s_Win_IsNetworkPath(), and CDirEntry::SplitPath().

Referenced by CFileDeleteList::Add(), CLDS2_Manager::AddDataFile(), CAlignSort::CAlignSort(), CAsnCache::CAsnCache(), CAsnCacheStore::CAsnCacheStore(), CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CBuildDatabase::CBuildDatabase(), CVPath::ConvertSysPathToPOSIX(), CDir::Create(), CCgiApplication::CreateFastCGIWatchFile(), CDir::CreatePath(), FindFiles(), CHugeFileProcess::ForEachEntry(), GetAbsolutePath(), CFileManifest::GetAllFilePaths(), CLDS2_DataLoader::GetLoaderNameFromArgs(), NCBITEST_AUTO_INIT(), CDownloadJob::Run(), CBlastdbConvertApp::Run(), CSplignApp::Run(), CCleanupApp::Run(), CDiscRepApp::Run(), CTbl2AsnApp::Run(), COmssa2pepxmlApplication::Run(), CGffDeconcatApp::Run(), s_GetFileName(), s_GetIndexFileName(), CFileHandleDiagHandler::SetLogName(), CFileDiagHandler::SetLogName(), sx_GetVPath(), TraverseAndRunTestCases(), CAsnvalThreadState::ValidateOneHugeBlob(), CDownloadJob::x_DownloadAndExtract(), CBDB_Cache::x_PidLock(), and CDataLoadersUtil::x_SetupLDS2DataLoader().

◆ CreateObject()

Construct a directory entry object of a specified type.

An object of specified type will be constructed in memory only, file system will not be modified.

Parameters
type Define a type of the object to create.
Returns
A pointer to newly created entry. If a class for specified type is not defined, generic CDirEntry will be returned. Do not forget to delete the returned pointer when it is no longer used.
See also
CFile, CDir, CSymLink

Definition at line 277 of file ncbifile.cpp.

References CDirEntry::CDirEntry(), CDirEntry::eDir, CDirEntry::eFile, and CDirEntry::eLink.

Referenced by CDirEntry::Rename(), s_AddEntry(), CArchive::x_ExtractEntry(), CTar::x_ProcessEntry(), and CArchive::x_RestoreAttrs().

◆ CreatePath()

Create the directory path recursively possibly more than one at a time.

Returns
TRUE if operation successful; FALSE otherwise.
See also
Create

Definition at line 4104 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::CreateAbsolutePath(), DIR_SEPARATORS, CNcbiError::eInvalidArgument, ctll::empty(), CDirEntry::Exists(), F_ISSET, flags, CDirEntry::GetDefaultModeT(), CDirEntry::GetDir(), CDirEntry::GetPath(), CDirEntry::GetPathSeparator(), i, LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, NCBI_OS_MSWIN, NcbiSys_stat, NPOS, s_DirCreate(), st(), and tmp.

Referenced by CMsvcConfigure::AnalyzeDefines(), CArg_Dir::AsDirectory(), CAlignSort::CAlignSort(), CFileDBEngine::CFileDBEngine(), CNetStorageServer::CheckStartAfterCrash(), CMultiFileDestination::CMultiFileDestination(), CDir::Copy(), CFileDBEngine::CreateBlob(), CProjBulderApp::CreateCheckList(), CreateConfigurableFile(), CBuildDatabase::CreateDirectories(), CProjBulderApp::CreateFeaturesAndPackagesFiles(), CFileCode::CreateFileFolder(), CRemoteAppRemoverTask::CRemoteAppRemoverTask(), CFileDBEngine::DropDB(), CSplitCacheApp::GetFileName(), CProjBulderApp::ParseArguments(), CPrimeCacheApplication::Run(), CAsnSubCacheCreateApplication::Run(), s_CreateThirdPartyLibsInstallMakefile(), s_ExpandProjectFolder(), CMakeNode::Write(), CMakeProject::Write(), CMsvcConfigure::WriteBuildVer(), CMsvcConfigure::WriteExtraDefines(), CArg_Ios::x_CreatePath(), CDumpASNIndex::x_CreateRootDir(), CRemoteAppRequest::x_CreateWDir(), and CTar::x_ExtractEntry().

◆ CreateRelativePath()

Create a relative path between two points in the file system specified by their absolute paths.

Parameters
path_from Absolute path that defines start of the relative path. path_to Absolute path that defines endpoint of the relative path.
Returns
Relative path (empty string if the paths are the same). Throw CFileException on error (e.g. if any of the paths is not absolute, or if it is impossible to create a relative path, such as in case of different disks on MS-Windows).

Definition at line 599 of file ncbifile.cpp.

References CDirEntry::AddTrailingPathSeparator(), NStr::Compare(), DIR_PARTS_CMP_MODE, CDirEntry::GetPathSeparator(), i, CDirEntry::IsAbsolutePath(), min(), NCBI_THROW, s_StripDir(), and CDirEntry::SplitPath().

Referenced by CProjBulderApp::AddCustomMetaData(), CMsvcPrjProjectContext::AdditionalIncludeDirectories(), CMsvcPrjProjectContext::AdditionalLibraryDirectories(), CProjectsLstFileFilter::CheckProject(), CMsvcPrjGeneralContext::CMsvcPrjGeneralContext(), CMsvcPrjProjectContext::CMsvcPrjProjectContext(), CMsvcPrjFilesCollector::CollectExtra(), CMsvcPrjFilesCollector::CollectResources(), CMsvcPrjFilesCollector::CollectSources(), CProjectTreeFolders::CreatePath(), SAsnProjectSingleT::DoCreate(), SAsnProjectMultipleT::DoCreate(), SAppProjectT::DoCreate(), SMsvcProjectT::DoCreate(), CProjBulderApp::GenerateUnixProjects(), CProjBulderApp::GetUtilityProjectsSrcDir(), IdentifySlnGUID(), CProjectsLstFileFilter::InitFromString(), CProjBulderApp::ParseArguments(), CProjectTreeBuilder::ProcessDir(), CProjBulderApp::RegisterProjectWatcher(), CProjBulderApp::ReportGeneratedFiles(), CProjSRCResolver::ResolveTo(), s_AddProjItemToDll(), s_CollectDatatoolIds(), s_CollectRelPathes(), s_ConvertRelativePaths(), s_InitalizeDllProj(), and CMsvcConfigure::WriteNcbiconfMsvcSite().

◆ CreateTemporary()

Create temporary file in the specified directory.

The prefix argument is used to generate a unique file name.

Definition at line 6559 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::AddTrailingPathSeparator(), buffer, CFileIO_Base::eCreateNew, CFileIO_Base::eReadWrite, CFileIO::eRemoveASAP, CDir::GetAppTmpDir(), GetCurrentThreadSystemID(), CCurrentProcess::GetPid(), int, kInvalidHandle, CFileIO::m_AutoClose, CFileIO::m_AutoRemove, CFileIO::m_Handle, CFileIO::m_Pathname, max(), NCBI_THROW, NcbiSys_remove, NULL, NStr::NumericToString(), CFileIO::Open(), PATH_MAX, and s_Count().

Referenced by CNetCacheReader::CNetCacheReader(), CNetCacheWriter::CNetCacheWriter(), and CDirEntry::GetTmpNameEx().

◆ CreateTmpFile()

Create temporary file and return pointer to corresponding stream.

The temporary file will be automatically deleted after the stream object is deleted. If the file exists before the function call, then after the function call it will be removed. Also any previous contents of the file will be overwritten.

Parameters
filename Use this value as name of temporary file. If "kEmptyStr" is passed generate a temporary file name. text_binary Specifies if temporary filename should be text ("eText") or binary ("eBinary"). allow_read If set to "eAllowRead", read and write are permitted on temporary file. If set to "eWriteOnly", only write is permitted on temporary file.
Returns
See also
CreateTmpFileEx

Definition at line 2985 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::eAllowRead, CDirEntry::eBinary, CNcbiError::eNoSuchFileOrDirectory, CDirEntry::eTmpFileCreate, file, CDirEntry::GetTmpName(), in(), LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, NcbiSys_fopen, out(), and trunc.

Referenced by CDirEntry::CreateTmpFileEx(), s_GetBigBedFeats(), s_GetBigBedSummary(), s_GetData(), CWigGraph::x_GetBigWigData(), CWigGraph::x_GetBigWigSummary(), and CRemoteBlast::x_GetSearchResultsHTTP().

◆ CreateTmpFileEx()

Create temporary file and return pointer to corresponding stream.

Similar to CreateTmpEx() except that you can also specify the directory in which to create the temporary file and the prefix string to be used for creating the temporary file.

The temporary file will be automatically deleted after the stream object is deleted. If the file exists before the function call, then after the function call it will be removed. Also any previous contents of the file will be overwritten.

Parameters
dir The directory in which the temporary file is to be created. If not specified, the temporary file will be created in the current directory. prefix Use this value as the prefix for temporary file name. If "kEmptyStr" is passed generate a temporary file name. text_binary Specifies if temporary filename should be text ("eText") or binary ("eBinary"). allow_read If set to "eAllowRead", read and write are permitted on temporary file. If set to "eWriteOnly", only write is permitted on temporary file.
Returns
See also
CreateTmpFile

Definition at line 3038 of file ncbifile.cpp.

References CDirEntry::CreateTmpFile(), CDirEntry::eTmpFileCreate, and CDirEntry::GetTmpNameEx().

◆ CSymLink() [1/3] ◆ CSymLink() [2/3]

Constructor using specified path string.

Definition at line 4153 of file ncbifile.hpp.

◆ CSymLink() [3/3] CSymLink::CSymLink ( void  ) inline ◆ CTmpFile() [1/3] ◆ CTmpFile() [2/3]

Constructor.

Use given temporary file name.

Definition at line 5396 of file ncbifile.cpp.

◆ CTmpFile() [3/3] ◆ DeleteTrailingPathSeparator()

Delete trailing path separator, if any.

Definition at line 465 of file ncbifile.cpp.

References DIR_SEPARATORS.

Referenced by CDirEntry::Backup(), CDir::Create(), CSQLITE3_BlobCacheCF::CreateInstance(), CDllResolver::FindCandidates(), NASNCacheFileName::GenerateLockfilePath(), CProjBulderApp::GenerateUnixProjects(), CTestBMApp::Init(), CDirEntry::NormalizePath(), CProjectTreeBuilder::ProcessDir(), CProjBulderApp::RegisterProjectWatcher(), CDirEntry::Reset(), and CQueueDataBase::x_BackupDump().

◆ DereferenceLink()

Dereference a link.

If the current entry is a symbolic link, then dereference it recursively until it is no further a link (but a file, directory, etc, or does not exist). Replace the entry path string with the dereferenced path.

Note
This method dereference only last component of the path. To dereference all path components use DereferencePath() method.
See also
DereferencePath, IsLink, LookupLink, NormalizePath

Definition at line 2360 of file ncbifile.cpp.

References eNormalizePath, CDirEntry::GetDir(), CDirEntry::IsAbsolutePath(), CDirEntry::IsLink(), CDirEntry::LookupLink(), CDirEntry::MakePath(), CDirEntry::NormalizePath(), prev(), and CDirEntry::Reset().

Referenced by CFile::Copy(), CDir::Copy(), GetSybaseClientVersion(), CDirEntry::Rename(), s_DereferencePath(), and CVDBAliasNode::x_ResolveVDBList().

◆ DereferencePath() void CDirEntry::DereferencePath ( void  ) ◆ Exists() [1/4] bool CDirEntry::Exists ( void  ) const virtual

Check the entry existence.

Reimplemented in CSymLink, CDir, and CFile.

Definition at line 2325 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::GetPath(), HANDLE, INVALID_HANDLE_VALUE, NULL, and CNcbiError::SetFromWindowsError().

Referenced by CMsvcPrjProjectContext::AdditionalLinkerOptions(), CPrintOptions::CPrintOptions(), CDirEntry::CreateAbsolutePath(), CDir::CreatePath(), CTarTempDirEntry::CTarTempDirEntry(), CIgBlastArgs::ExtractAlgorithmOptions(), CProjBulderApp::FindDepGraph(), CVDBMgr::FindDereferencedAccPath(), g_FindDataFile(), CFtglFontManager::GetFont(), CDirEntry::GetNearestExistingParentDir(), CFlatFileParser::Parse(), FileMessenger::PollMessageFile(), CDirEntry::Rename(), CDownloadJob::Run(), CBlastdbConvertApp::Run(), s_GetDiskSpace_PANFS(), s_GetFileSystemInfo(), CLDS2_Manager::UpdateData(), CArg_Ios::x_CreatePath(), CMsvcSite::x_DirExists(), CBDB_Cache::x_DropOverflow(), and CTar::x_ExtractEntry().

◆ Exists() [2/4] bool CFile::Exists ( void  ) const inlinevirtual

Check existence of file.

Note
CDirEntry::Exists() could be faster on some platforms, if you don't need to check that entry is a file.
See also
CDirEntry::Exists

Reimplemented from CDirEntry.

Definition at line 4048 of file ncbifile.hpp.

References CDirEntry::IsFile().

Referenced by BlastDbFileExists(), BOOST_AUTO_TEST_CASE(), CBlastLMDBManager::CBlastEnv::CBlastEnv(), CNCHeartBeat::CheckConfFile(), CSeqDBAliasNode::ComputeMasks(), CLDS2_Database::Create(), CNetStorageServer::CreateCrashFlagFile(), CGlShader::CreateShader(), DeserializePauseState(), DeserializeRefuseSubmitState(), CBlastDbFinder::GetFileName(), GetIndexSuperHeader(), CBDB_Cache::GetSizeEx(), CAutoOutputFileReset::GetStream(), CAlignFormatUtil::GetURLFromRegistry(), CSeqDBIsam::IndexExists(), CSeqDBGiIndex::IndexExists(), CAlignFormatUtil::InitConfig(), CNetScheduleServer::InitNodeID(), CFileLoader::LoadFile(), CMacroFlowEditor::OnSaveCopies(), CBDB_Cache::Open(), CFileIO::Open(), CSeqIdChunkFile::OpenForRead(), CChunkFile::OpenForRead(), CChunkFile::OpenForWrite(), CSeqIdChunkFile::OpenForWrite(), CDiagContext::PrintStart(), CCgiRequestProcessor::ProcessHelpRequest(), CNetStorageServer::RemoveCrashFlagFile(), NVcfUtil::RemoveFile(), CNgAlignApp::Run(), CTbl2AsnApp::Run(), SGridWorkerNodeImpl::Run(), CMultiApplication::Run(), CAgpconvertApplication::Run(), CPrimeCacheApplication::Run(), CChunkFile::s_FindLastChunk(), CChunkFile::s_FindNextChunk(), s_LockInstanceGuard(), CSequenceEditingEventHandler::SaveSubmissionFile(), SerializePauseState(), SerializeRefuseSubmitState(), CCodeGenerator::UndoGenerateCode(), CMsvcConfigure::WriteBuildVer(), CQueueDataBase::x_AppendDumpLinkedSections(), CQueueDataBase::x_CheckOpenPreconditions(), CBlastUsageReport::x_CheckRunEnv(), CSeqDBOIDList::x_ComputeFilters(), CQueueDataBase::x_CreateCrashFlagFile(), CBamLoadingJob::x_CreateDataLoader(), CQueueDataBase::x_CreateDumpErrorFlagFile(), CQueueDataBase::x_DoesCrashFlagFileExist(), CNetStorageServer::x_DoesCrashFlagFileExist(), CQueueDataBase::x_DoesDumpErrorFlagFileExist(), CSeqDB::x_GetDBFilesMetaData(), CQueueDataBase::x_ReadDumpQueueDesrc(), CQueueDataBase::x_RemoveCrashFlagFile(), CQueueDataBase::x_RemoveDumpErrorFlagFile(), CQueueDataBase::x_RemoveSpaceReserveFile(), and CVDBAliasNode::x_ResolveVDBList().

◆ Exists() [3/4] bool CDir::Exists ( void  ) const inlinevirtual

Check if directory "dirname" exists.

Note
CDirEntry::Exists() could be faster on some platforms, if you don't need to check that entry is a directory.

Reimplemented from CDirEntry.

Definition at line 4075 of file ncbifile.hpp.

References CDirEntry::IsDir().

Referenced by BDB_CreateEnv(), CAlignSort::CAlignSort(), CFileDBEngine::CFileDBEngine(), CMacroFlowEditor::CopyDefaultLibrary(), CFileDBEngine::CreateBlob(), CProjBulderApp::CreateCheckList(), CreateConfigurableFile(), CBuildDatabase::CreateDirectories(), CRemoteAppRemoverTask::CRemoteAppRemoverTask(), CAgpFastaComparator::CTmpSeqVecStorage::CTmpSeqVecStorage(), CFileDBEngine::DropDB(), CFileDBEngine::GetCommands(), CFileDBEngine::HasBlob(), CSeqTestApplication::Init(), CInputStreamSource::InitFilesInDirSubtree(), CBDB_Cache::Open(), CSQLITE3_Cache::Open(), CBDB_Volumes::Open(), CBDB_ExtBlobStore< TBV >::Open(), CAgpConverter::OutputOneFileForEach(), CProjBulderApp::ParseArguments(), CFileObsolete::Remove(), CTbl2AsnApp::Run(), CConcatSeqEntriesApplication::Run(), CAsnCacheDumpSeqIdsApplication::Run(), CPrimeCacheApplication::Run(), CReadIndexSpeedApp::Run(), CAsnSubCacheCreateApplication::Run(), CGffDeconcatApp::Run(), CTAbleValApp::Run(), CRunTestApplication::Run(), s_CollectRelPathes(), s_CreateThirdPartyLibsInstallMakefile(), s_EnsureDirExist(), NMacroStats::SaveScriptToFile(), CBDB_Env::SetLogDir(), CSplitCacheApp::SetupCache(), TraverseAndRunTestCases(), CAsnvalApp::ValidateOneDirectory(), CQueueDataBase::x_AppendDumpLinkedSections(), CQueueDataBase::x_BackupDump(), CQueueDataBase::x_CheckOpenPreconditions(), CDumpASNIndex::x_CreateRootDir(), CQueueDataBase::x_CreateSpaceReserveFile(), CRemoteAppRequest::x_CreateWDir(), CQueueDataBase::x_Dump(), CQueueDataBase::x_Open(), CDiscRepApp::x_ParseDirectory(), CAsn2FastaApp::x_ProcessISubdirectory(), CQueueDataBase::x_ReadDumpQueueDesrc(), CQueueDataBase::x_RemoveDataFiles(), CQueueDataBase::x_RemoveDump(), CRemoteAppRequest::x_RemoveWDir(), and CBDB_Cache::x_TruncateDB().

◆ Exists() [4/4] bool CSymLink::Exists ( void  ) const inlinevirtual ◆ Extend() void * CMemoryFile::Extend ( size_t  new_lendth = 0 )

Extend length of the mapped region.

If the sum of the current offset (from Map() method) and new size of the mapped region is more than current file size, that file size will be increased, added space filed with zeros and mapped region will be remapped.

Parameters
new_length New length of the mapped region. The value 0 means that file will be mapped from 'offset' to the end of file.
Returns
New pointer to start of data.
See also
GetPtr, GetOffset, GetSize

Definition at line 6147 of file ncbifile.cpp.

References get_limits(), CMemoryFileMap::GetFileSize(), CMemoryFileSegment::GetOffset(), CMemoryFile::GetPtr(), NStr::Int8ToString(), CMemoryFile::m_Ptr, CMemoryFile::Map(), max(), NCBI_THROW, offset, CMemoryFileMap::x_Close(), CMemoryFileMap::x_Extend(), CMemoryFileMap::x_GetMemoryFileSegment(), CMemoryFileMap::x_Open(), and CMemoryFile::x_Verify().

◆ FindFiles() [1/7]

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

Definition at line 6266 of file ncbifile.cpp.

References CDirEntry::CreateAbsolutePath(), DIR_SEPARATOR, fFF_All, flags, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CDir::GetCwd(), CDirEntry::GetPathSeparator(), result, NStr::Split(), CDirEntry::SplitPathEx(), and x_Glob().

Referenced by x_Glob().

◆ FindFiles() [2/7]

template<class TContainer , class TPathIterator >

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 3319 of file ncbifile.hpp.

References FindFiles(), flags, and out().

◆ FindFiles() [3/7]

template<class TContainer , class TPathIterator >

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 3288 of file ncbifile.hpp.

References FindFiles(), flags, and out().

◆ FindFiles() [4/7]

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 3350 of file ncbifile.hpp.

References FindFiles(), flags, and out().

◆ FindFiles() [5/7]

template<class TPathIterator , class TFindFunc >

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 3230 of file ncbifile.hpp.

References FindFilesInDir(), and flags.

◆ FindFiles() [6/7]

template<class TPathIterator , class TFindFunc >

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 3155 of file ncbifile.hpp.

References FindFilesInDir(), and flags.

Referenced by CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CWriteDB_ConsolidateAliasFiles(), CDllResolver::FindCandidates(), FindFiles(), GetTaxIdWithWindowMaskerSupport(), CInputStreamSource::InitFilesInDirSubtree(), CRunTestApplication::Run(), and s_OldGetTaxIdWithWindowMaskerSupport().

◆ FindFiles() [7/7]

template<class TPathIterator , class TMaskIterator , class TFindFunc >

void 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 3202 of file ncbifile.hpp.

References FindFiles(), and flags.

◆ FindFiles2() [1/4]

template<class TContainer , class TPathIterator >

◆ FindFiles2() [2/4]

template<class TContainer , class TPathIterator >

◆ FindFiles2() [3/4]

template<class TPathIterator , class TFindFunc >

◆ FindFiles2() [4/4]

template<class TPathIterator , class TFindFunc >

◆ FindFilesInDir() [1/2]

template<class TFindFunc >

Find files in the specified directory.

Definition at line 3085 of file ncbifile.hpp.

References CDirEntry::AddTrailingPathSeparator(), NStr::eCase, NStr::eNocase, fFF_All, fFF_Dir, fFF_File, fFF_Nocase, fFF_Recursive, CDir::fIgnorePath, CDir::fIgnoreRecursive, FindFilesInDir(), flags, CDir::GetEntriesPtr(), CDirEntry::GetPath(), CDirEntry::IsDir(), ITERATE, kEmptyStr, CDirEntry::MakePath(), CMask::Match(), NULL, and CDirEntry::Reset().

◆ FindFilesInDir() [2/2]

template<class TFindFunc >

Find files in the specified directory.

Definition at line 3032 of file ncbifile.hpp.

References CDirEntry::AddTrailingPathSeparator(), NStr::eCase, NStr::eNocase, fFF_All, fFF_Dir, fFF_File, fFF_Nocase, fFF_Recursive, CDir::fIgnorePath, CDir::fIgnoreRecursive, flags, CDir::GetEntriesPtr(), CDirEntry::GetPath(), CDirEntry::IsDir(), ITERATE, kEmptyStr, CDirEntry::MakePath(), CDirEntry::MatchesMask(), NULL, and CDirEntry::Reset().

Referenced by BOOST_AUTO_TEST_CASE(), FindBlastDBs(), FindFiles(), FindFiles2(), FindFilesInDir(), NCBITEST_AUTO_INIT(), sUpdateAll(), and TraverseAndRunTestCases().

◆ Flush() [1/6] bool CMemoryFileMap::Flush ( void *  ptr ) const inline ◆ Flush() [2/6] ◆ Flush() [3/6] ◆ Flush() [4/6] bool CMemoryFileSegment::Flush ( void  ) const ◆ Flush() [5/6] bool CMemoryFile::Flush ( void  ) const inline ◆ Flush() [6/6] void CFileIO::Flush ( void  ) const ◆ GetAppTmpDir() string CDir::GetAppTmpDir ( void  ) static ◆ GetBackupSuffix() const char * CDirEntry::GetBackupSuffix ( void  ) inlinestatic ◆ GetBase() string CDirEntry::GetBase ( void  ) const inline

Get the base entry name without extension.

Definition at line 3934 of file ncbifile.hpp.

References CDirEntry::GetPath(), and CDirEntry::SplitPath().

Referenced by CBAMDataLoader_Impl::AddBamFile(), CBAMDataLoader_Impl::AddSrzDef(), CreateProjKey(), CNcbiApplicationAPI::FindProgramExecutablePath(), CCodeGenerator::GenerateCombiningFile(), CCodeGenerator::GenerateCvsignore(), CCodeGenerator::GenerateDoxygenGroupDescription(), CCodeGenerator::GenerateFileList(), IsProducedByDatatool(), DTDParser::Modules(), CTbl2AsnApp::Run(), CFileDiagHandler::SetLogFile(), CDiagContext::SetupDiag(), CFileCode::WriteUserCopyright(), CGBProjectTool::x_Collapse(), CDiscRepApp::x_ConstructOutputName(), and CBamFileInfo::x_Initialize().

◆ GetCwd()

Get the current working directory.

Definition at line 3706 of file ncbifile.cpp.

References _T_CSTRING, buf, kEmptyCStr, LOG_ERROR_ERRNO, and NcbiSys_getcwd.

Referenced by BOOST_AUTO_TEST_CASE(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CDirEntry::CreateAbsolutePath(), CRemoteAppLauncher::CRemoteAppLauncher(), CSymbolGuard::CSymbolGuard(), CWriteDB_ConsolidateAliasFiles(), CRemoteAppLauncher::ExecRemoteApp(), CIgBlastArgs::ExtractAlgorithmOptions(), FindFiles(), CNcbiApplicationAPI::FindProgramExecutablePath(), FtaErrGetMsgCodes(), CSeqDBAtlas::GenerateSearchPath(), MakeAbsolutePath(), CProjBulderApp::ParseArguments(), CProjBulderApp::RegisterProjectWatcher(), CProjBulderApp::ReportGeneratedFiles(), CExec::ResolvePath(), CSplignApp::Run(), s_FindPathToWM(), s_GetFileSystemInfo(), s_ProcessParameters(), s_StoreStartupParams(), SetLogFileName(), CNCServer::WriteEnvInfo(), CSeqDBAliasNode::x_ExpandAliases(), and CMetaRegistry::x_FindRegistry().

◆ GetDefaultMode() ◆ GetDefaultModeGlobal() ◆ GetDefaultModeT() mode_t CDirEntry::GetDefaultModeT ( void  ) const inlineprotected ◆ GetDeleteList() ◆ GetDir()

Get the directory component for this directory entry.

Parameters
path Flag to control returning value for paths that don't have directory name.
Returns
The directory component for this directory entry, or empty string.
See also
EGetDirMode, SplitPath

Definition at line 475 of file ncbifile.cpp.

References DIR_CURRENT, DIR_SEPARATOR, CDirEntry::eIfEmptyPath_Current, ctll::empty(), CDirEntry::GetPath(), CDirEntry::SplitPath(), and string.

Referenced by CSimpleMakeFileContents::SParser::AcceptLine(), CMsvcPrjProjectContext::CMsvcPrjProjectContext(), CMultiFileSource::CMultiFileSource(), CDir::Create(), createAnnot(), CBuildDatabase::CreateDirectories(), CFileCode::CreateFileFolder(), CDir::CreatePath(), CDirEntry::DereferenceLink(), CMetaDataTest::DoTest(), CCodeGenerator::GenerateCode(), CCodeGenerator::GenerateFileList(), CCodeGenerator::GenerateModuleCPP(), GetDefaultLogLocation(), CDirEntry::GetNearestExistingParentDir(), CProjBulderApp::GetUtilityProjectsDir(), CProjBulderApp::GetUtilityProjectsSrcDir(), CProjectsLstFileFilter::InitFromFile(), CCodeGenerator::IsGitRepository(), DTDParser::Modules(), CProjBulderApp::ParseArguments(), CProjSRCResolver::PrepareResolver(), CBam2GraphApp::ProcessSrz(), CSearchHelper::ReadModFiles(), CFileHandleDiagHandler::Reopen(), CBlastdbConvertApp::Run(), s_GetMakefileIncludes(), CFileDiagHandler::SetLogFile(), SetLogFile(), CProjBulderApp::VerifyArguments(), CDiscRepApp::x_ConstructOutputName(), CArg_Ios::x_CreatePath(), CTar::x_ExtractEntry(), and CDataLoadersUtil::x_SetupSRADataLoader().

◆ GetEntries() [1/6] ◆ GetEntries() [2/6]

Get directory entries based on the specified set of "masks".

Parameters
mask Use to select only entries that match this set of masks. flags Flags defines behavior and which entries to return.
Returns
A list containing all directory entries. Return empty list on error.
Note
Use fThrowOnError to avoid getting empty list on error and throwing an exception instead.

Definition at line 3949 of file ncbifile.cpp.

References flags.

◆ GetEntries() [3/6] ◆ GetEntries() [4/6]

Get directory entries based on the specified "mask".

Parameters
mask Use to select only entries that match this mask. Do not use file mask if set to "kEmptyStr". flags Flags defines behavior and which entries to return.
Returns
A list containing all directory entries. Return empty list on error.
Note
Use fThrowOnError to avoid getting empty list on error and throwing an exception instead.

Definition at line 3844 of file ncbifile.cpp.

References CMask::Add(), flags, and mask.

Referenced by CLDS2_Manager::AddDataDir(), CAsnCache::CAsnCache(), CBDB_Env::CheckRemove(), CMsvcSite::CMsvcSite(), CMultiFileSource::CMultiFileSource(), CMetaDataTest::DoTest(), DumpSeqEntries(), CSampleLibraryObject::FindInPath(), CFileDBEngine::GetCommands(), CDir::GetEntries(), LoadScope(), CBDB_Cache::Open(), CBDB_Volumes::Open(), CProjectTreeBuilder::ProcessDir(), CBiosampleChkApp::ProcessOneDirectory(), CFileObsolete::Remove(), CAsnSubCacheCreateApplication::Run(), subfuse::CSubfuseApp::Run(), CTLSApp::Run(), s_CollapseProjectFolder(), s_CollectRelPathes(), s_IsInsideDatatoolSourceDir(), s_UpdateMacros(), CAsnvalApp::ValidateOneDirectory(), CArchive::x_Append(), CElementaryMatching::x_CleanVolumes(), CDownloadJob::x_DownloadAndExtract(), CElementaryMatching::x_InitParticipationVector(), CDiscRepApp::x_ParseDirectory(), CAsn2FastaApp::x_ProcessISubdirectory(), CCleanupApp::x_ProcessOneDirectory(), CQueueDataBase::x_ReadDumpQueueDesrc(), CQueueDataBase::x_RemoveDataFiles(), CElementaryMatching::x_Search(), and CBDB_Cache::x_TruncateDB().

◆ GetEntries() [5/6] ◆ GetEntries() [6/6]

Get directory entries based on the specified set of "masks".

Parameters
masks Use to select only entries that match this set of masks. flags Flags defines behavior and which entries to return.
Returns
A list containing all directory entries. Return empty list on error.
Note
Use fThrowOnError to avoid getting empty list on error and throwing an exception instead.

Definition at line 3864 of file ncbifile.cpp.

References flags.

◆ GetEntriesPtr() [1/6] ◆ GetEntriesPtr() [2/6]

Get directory entries based on the specified set of "masks".

This methods are faster on big directories than GetEntries().

Parameters
mask Use to select only entries that match this set of masks. flags Flags defines behavior and which entries to return.
Returns
A pointer to list of directory entries. NULL in the case of error.
Note
Do not forget to release allocated memory using return pointer.

Definition at line 3956 of file ncbifile.cpp.

References _T_CSTRING, _T_XCSTRING, CDirEntry::AddTrailingPathSeparator(), DIR_CURRENT, NStr::eCase, CDirEntry::eFile, ctll::empty(), NStr::eNocase, F_ISSET, flags, CDirEntry::GetPath(), HANDLE, INVALID_HANDLE_VALUE, IS_RECURSIVE_ENTRY, CMask::Match(), NCBI_THROW, NULL, s_AddEntry(), s_SetFindFileError(), CNcbiError::SetFromErrno(), CNcbiError::SetFromWindowsError(), and CNcbiError::SetWindowsError().

◆ GetEntriesPtr() [3/6] ◆ GetEntriesPtr() [4/6] ◆ GetEntriesPtr() [5/6] ◆ GetEntriesPtr() [6/6]

Get directory entries based on the specified set of "masks".

This methods are faster on big directories than GetEntries().

Parameters
mask Use to select only entries that match this set of masks. flags Flags defines behavior and which entries to return.
Returns
A pointer to list of directory entries. NULL in the case of error.
Note
Do not forget to release allocated memory using return pointer.

Definition at line 3871 of file ncbifile.cpp.

References _T_CSTRING, _T_XCSTRING, CDirEntry::AddTrailingPathSeparator(), DIR_CURRENT, NStr::eCase, CDirEntry::eFile, ctll::empty(), NStr::eNocase, F_ISSET, flags, CDirEntry::GetPath(), HANDLE, INVALID_HANDLE_VALUE, IS_RECURSIVE_ENTRY, ITERATE, kEmptyStr, mask, CDirEntry::MatchesMask(), NCBI_THROW, NULL, s_AddEntry(), s_SetFindFileError(), CNcbiError::SetFromErrno(), CNcbiError::SetFromWindowsError(), and CNcbiError::SetWindowsError().

◆ GetErrCodeString() [1/2] const char * CFileException::GetErrCodeString ( void  ) const overridevirtual ◆ GetErrCodeString() [2/2] const char * CFileErrnoException::GetErrCodeString ( void  ) const overridevirtual ◆ GetExt() string CDirEntry::GetExt ( void  ) const inline ◆ GetFileHandle() [1/3] TFileHandle CFileReaderWriter_Base::GetFileHandle ( void  ) inline ◆ GetFileHandle() [2/3]

Return system file handle.

If you want to read/write from/to the file, you should work with it using only the file descriptor, obtained using this method. It can be the same file descriptor as was given in the constructor.

Returns
File descriptor associated with the file.

Definition at line 3881 of file ncbifile.hpp.

References CFileLock::m_Handle.

◆ GetFileHandle() [3/3] ◆ GetFileIO() CFileIO& CFileReaderWriter_Base::GetFileIO ( void  ) inline ◆ GetFileName() [1/2] const string& CMemoryFileMap::GetFileName ( void  ) const inlinenoexcept ◆ GetFileName() [2/2] ◆ GetFilePos() Uint8 CFileIO::GetFilePos ( void  ) const ◆ GetFileSize() [1/2] Int8 CMemoryFileMap::GetFileSize ( void  ) const

Get length of the mapped file.

Returns
Size in bytes of the mapped file.

Definition at line 5872 of file ncbifile.cpp.

References CFile::GetLength(), SMemoryFileHandle::hMap, kInvalidHandle, LOG_ERROR_ERRNO, CMemoryFileMap::m_FileName, CMemoryFileMap::m_Handle, NcbiSys_fstat, and st().

Referenced by BOOST_AUTO_TEST_CASE(), CMemoryFileMap::CMemoryFileMap(), CMemoryFile::Extend(), CMemoryFile::GetSize(), and CMemoryFileMap::Map().

◆ GetFileSize() [2/2] Uint8 CFileIO::GetFileSize ( void  ) const ◆ GetFileSystemInfo()

Get file system information.

Get information for the user associated with the calling thread only.

Parameters
path String that specifies filesystem for which information is to be returned. info Pointer to structure which receives file system information.

Definition at line 5320 of file ncbifile.cpp.

References fFSI_All, info, and s_GetFileSystemInfo().

◆ GetFreeDiskSpace() ◆ GetHome() ◆ GetLength() Int8 CFile::GetLength ( void  ) const

Get size of file.

Returns
Size of the file, if operation successful; -1, otherwise.

Definition at line 3204 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::eFile, CNcbiError::eOperationNotPermitted, CDirEntry::GetPath(), CDirEntry::GetType(), LOG_ERROR_ERRNO, LOG_ERROR_NCBI, NcbiSys_stat, and st().

Referenced by CChunkFile::Append(), BOOST_AUTO_TEST_CASE(), CBlastLMDBManager::CBlastEnv::CBlastEnv(), CCompressionDictionary::CCompressionDictionary(), CheckWrittenFile(), CTaxDBFileInfo::CTaxDBFileInfo(), CMetaDataTest::DoTest(), CMemoryFileMap::GetFileSize(), GetIndexSuperHeader(), GetMemoryUsage(), CCurrentProcess::GetMemoryUsage(), CBDB_Cache::GetSizeEx(), CFileLoader::LoadFile(), CDbIndex::LoadIndex(), CTableImportDataSource::LoadTable(), CHugeFile::Open(), CHugeFile::OpenPlain(), FileMessenger::PollMessageFile(), CAttribTableDelimitersPanel::PreviewData(), CTableFormatPanel::PreviewData(), CTbl2AsnApp::Run(), s_ConvertV4toV5(), CChunkFile::s_FindNextChunk(), s_OpenIndexDB(), CNCServer::WriteEnvInfo(), CBDB_Cache::x_CreateOverflowReader(), CSeqDB::x_GetDBFilesMetaData(), CUnicodeToAsciiTranslation::x_Initialize(), CHTMLPage::x_LoadTemplate(), CHTMLPage::x_LoadTemplateLib(), CSoapServerApplication::x_ProcessWsdlRequest(), and CElementaryMatching::x_Search().

◆ GetList() ◆ GetMemoryFileSegment() ◆ GetMode() ◆ GetName() string CDirEntry::GetName ( void  ) const inline

Get the base entry name with extension (if any).

Definition at line 3926 of file ncbifile.hpp.

References CDirEntry::GetPath(), and CDirEntry::SplitPath().

Referenced by CMsvcPrjProjectContext::AdditionalLinkerOptions(), CWriteDB_Impl::Close(), CMultiFileSource::CMultiFileSource(), CDirEntry::CopyToDir(), CBuildDatabase::CreateDirectories(), CWriteDB_ConsolidateAliasFiles(), CWriteDB_CreateAliasFile(), SAppProjectT::DoCreate(), SLibProjectT::DoCreate(), CMetaDataTest::DoTest(), CCodeGenerator::GenerateCvsignore(), CCodeGenerator::GenerateFileList(), CProjBulderApp::GenerateUnixProjects(), CNcbiApplicationAPI::LoadConfig(), CDirEntry::MoveToDir(), CMultiFileDestination::Next(), SGridWorkerNodeImpl::OfflineRun(), CVDBGraphDataLoader_Impl::OpenVDBGraphFileOnce(), CFileModules::PrintSpecDump(), CBlastdbConvertApp::Run(), s_PositionAsString(), sRunTest(), CArgAllowMaximumFileNameLength::Verify(), CFileCode::WriteCopyright(), CFileCode::WriteSourceFile(), CFileCode::WriteSpecRefs(), CFileCode::WriteUserCopyright(), CDebugDumpViewer::x_CheckLocation(), CSeqDB::x_GetDBFilesMetaData(), CWriteDB_Impl::x_MakeAlias(), CTable2AsnValidator::x_PopulateDiscrepancy(), CAsn2FastaApp::x_ProcessISubdirectory(), and CDataLoadersUtil::x_SetupSRADataLoader().

◆ GetNearestExistingParentDir()

Given a path, gets the closest parent directory which actually exists.

Parameters
path Some path to a directory entry.
Returns
The closest parent directory which actually exists.
Exceptions
Note
For relative not-existent path it always returns ".". To avoid this, you can always use absolute path for "path": CDirEntry::GetNearestExistingParentDir(CDirEntry::CreateAbsolutePath(path))
On Unix, a non-empty path should always have some existing parent, because '/' is a common path that should always exist.
See also
GetDir, CreateAbsolutePath

Definition at line 547 of file ncbifile.cpp.

References CDirEntry::Exists(), CDirEntry::GetDir(), CDirEntry::GetPath(), NCBI_THROW, CDirEntry::NormalizePath(), and CDirEntry::Reset().

◆ GetObjectType() [1/4] virtual EType CDirEntry::GetObjectType ( void  ) const inlinevirtual ◆ GetObjectType() [2/4] virtual EType CFile::GetObjectType ( void  ) const inlinevirtual ◆ GetObjectType() [3/4] virtual EType CDir::GetObjectType ( void  ) const inlinevirtual ◆ GetObjectType() [4/4] virtual EType CSymLink::GetObjectType ( void  ) const inlinevirtual ◆ GetOffset() [1/3] ◆ GetOffset() [2/3] ◆ GetOffset() [3/3] ◆ GetOwner()

Get an entry owner.

WINDOWS: Retrieve the name of the account and the name of the first group, which the account belongs to. The obtained group name may be an empty string, if we don't have permissions to get it. Windows 2000/XP: In addition to looking up for local accounts, local domain accounts, and explicitly trusted domain accounts, it also can look for any account in any known domain around. UNIX: Retrieve an entry owner:group pair.

Parameters
owner Pointer to a string to receive an owner name. group Pointer to a string to receive a group name. follow Whether to follow symbolic links when getting the information. uid Pointer to an unsigned int to receive numeric user id (this information is purely supplemental). gid Pointer to an unsigned int to receive numeric group id (this information is purely supplemental).
Note
Numeric uid/gid may be fake ones on Windows (and may be 0).
The call will fail if neither owner nor group is provided non-NULL (even though uid and/or gid may be non-NULL).
It is in best interest of the caller to clear all strings and integers that are expected to get values out of this call prior to making the actual call.
Returns
TRUE if successful, FALSE otherwise.
See also
SetOwner

Definition at line 2760 of file ncbifile.cpp.

References eFollowLinks, CNcbiError::eInvalidArgument, CWinSecurity::GetFileOwner(), CUnixFeature::GetGroupNameByGID(), CDirEntry::GetPath(), CUnixFeature::GetUserNameByUID(), LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, NStr::NumericToString(), and st().

Referenced by CTar::x_Append(), and CArchive::x_Append().

◆ GetPath()

Get entry path.

Definition at line 3920 of file ncbifile.hpp.

References CDirEntry::m_Path.

Referenced by CLDS2_Manager::AddDataDir(), CChunkFile::Append(), CSeqIdChunkFile::Append(), CDirEntry::Backup(), BOOST_AUTO_TEST_CASE(), CDirEntry::CheckAccess(), CFile::Compare(), CFile::CompareTextContents(), CDirEntry::Copy(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CPrintOptions::CPrintOptions(), CSymLink::Create(), CDir::Create(), CreateLock(), CDir::CreatePath(), CTarTempDirEntry::CTarTempDirEntry(), CAgpFastaComparator::CTmpSeqVecStorage::CTmpSeqVecStorage(), CTmpEntryDeleter::Delete(), CDirEntry::DereferencePath(), CDirEntry::Exists(), CArchive::ExtractEntry(), CProjBulderApp::FindDepGraph(), CVDBMgr::FindDereferencedAccPath(), FindFilesInDir(), g_FindDataFile(), CCodeGenerator::GenerateFileList(), CDirEntry::GetBase(), CFileDBEngine::GetCommands(), CDirEntry::GetDir(), CDir::GetEntriesPtr(), CDirEntry::GetExt(), CFile::GetLength(), CDirEntry::GetMode(), CDirEntry::GetName(), CDirEntry::GetNearestExistingParentDir(), CDirEntry::GetOwner(), GetSybaseClientVersion(), CDirEntry::GetTime(), CDirEntry::GetTimeT(), CDirEntry::GetType(), CAsnSubCacheCreateApplication::IndexNewBlobsInSubCache(), CNetScheduleServer::InitNodeID(), CDirEntry::IsIdentical(), CDirEntry::LookupLink(), SGridWorkerNodeImpl::OfflineRun(), CBDB_Cache::Open(), CSeqIdChunkFile::OpenForRead(), CChunkFile::OpenForRead(), CChunkFile::OpenForWrite(), CSeqIdChunkFile::OpenForWrite(), SBlobInserter::operator()(), CBlastDbFinder::operator()(), CFindFileNamesFunc< TNames >::operator()(), CTestNameToInfoMapLoader::operator()(), SBlobCopier::operator()(), SBlobLocator::operator<(), SBlobLocator::operator==(), CAgpConverter::OutputOneFileForEach(), FileMessenger::PollMessageFile(), CProjectTreeBuilder::ProcessDir(), CTbl2AsnApp::ProcessOneFile(), CTAbleValApp::ProcessOneFile(), CChunkFile::RawRead(), FileMessenger::ReceiveCommands(), CDirEntry::Remove(), CDir::Remove(), CDirEntry::RemoveEntry(), CDirEntry::Rename(), CTarTempDirEntry::Restore(), CBlastdbConvertApp::Run(), CConcatSeqEntriesApplication::Run(), CAsnCacheDumpSeqIdsApplication::Run(), CPrimeCacheApplication::Run(), CReadIndexSpeedApp::Run(), CAsnSubCacheCreateApplication::Run(), CRunTestApplication::Run(), s_DereferencePath(), s_ExpandProjectFolder(), FileMessenger::SendPendingCommands(), CDirEntry::SetMode(), CDir::SetMode(), CDirEntry::SetModeEntry(), CDirEntry::SetOwner(), CDirEntry::SetTime(), CDirEntry::SetTimeT(), sRunFeatureTrimTest(), sRunTest(), CDirEntry::Stat(), sUpdateCase(), TraverseAndRunTestCases(), CAsnSubCacheCreateApplication::WriteBlobsInSubCache(), CMsvcConfigure::WriteBuildVer(), CFileCode::WriteSpecRefs(), CBlastUsageReport::x_CheckRunEnv(), CTar::x_ExtractEntry(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), CSeqDB::x_GetDBFilesMetaData(), CVDBAliasNode::x_ResolveVDBList(), CArchive::x_RestoreAttrs(), and CTar::x_RestoreAttrs().

◆ GetPathname() ◆ GetPathSeparator() char CDirEntry::GetPathSeparator ( void  ) static

Get path separator symbol specific for the current platform.

Definition at line 433 of file ncbifile.cpp.

References DIR_SEPARATOR.

Referenced by CDirEntry::AddTrailingPathSeparator(), BlastFindMatrixPath(), BOOST_AUTO_TEST_CASE(), CFileDBEngine::CFileDBEngine(), CMsvcPrjGeneralContext::CMsvcPrjGeneralContext(), CFileDBEngine::CommitTransaction(), CDirEntry::ConcatPathEx(), CFileDBEngine::CreateBlob(), CProjectTreeFolders::CreatePath(), CDir::CreatePath(), CDirEntry::CreateRelativePath(), CRemoteAppLauncher::CRemoteAppLauncher(), CTmpStreamGuard::CTmpStreamGuard(), CRemoteAppLauncher::ExecRemoteApp(), FindBlastDbPath(), FindFiles(), CNcbiApplicationAPI::FindProgramExecutablePath(), FtaErrGetMsgCodes(), NASNCacheFileName::GenerateLockfilePath(), CFileDBEngine::GetCommands(), CSeqDB::GetDBMetaData(), CSplitCacheApp::GetFileName(), CAgpFastaComparator::CTmpSeqVecStorage::GetFileName(), GetLdsDbDir(), CSimpleMakeFileContents::GetPathValue(), GetTaxIdWithWindowMaskerSupport(), CFileDBEngine::HasBlob(), CProjectsLstFileFilter::InitFromString(), CVDBBlastUtil::IsSRA(), CVDBBlastUtil::IsWGS(), LogCmdOptions(), CProjectTreeBuilder::ProcessDir(), ReadASNFromFile(), CProjBulderApp::RegisterProjectWatcher(), CDir::Remove(), CProjBulderApp::ReportGeneratedFiles(), CExec::ResolvePath(), CSplignApp::Run(), CSeqAnnotSplicerApp::Run(), s_CollectRelPathes(), s_OldGetTaxIdWithWindowMaskerSupport(), s_StripDir(), SeqDB_CombinePath(), SeqDB_ConvertOSPath(), SeqDB_RemoveDirName(), SeqDB_RemoveFileName(), CFtglFontManager::SetFontPath(), CDir::SetMode(), CMsvcSite::ToOSPath(), TraverseAndRunTestCases(), SNetStorage::SConfig::Validate(), WindowMaskerTaxidToDb(), CBlastDBCmdApp::x_AddCmdOptions(), CMakeBlastDBApp::x_BuildDatabase(), CMakeClusterDBApp::x_BuildDatabase(), CElementaryMatching::x_CreateRemapData(), CRemoteAppRequest::x_Deserialize(), CDownloadJob::x_Download(), CSeqDBAliasNode::x_ExpandAliases(), CFileDBEngine::x_GetCmdFileName(), CMsvcProjectMakefile::x_GetHeaders(), SDiagMessage::x_GetModule(), CElementaryMatching::x_InitFilteringVector(), CElementaryMatching::x_LoadRemapData(), CWriteDB_IndexFile::x_MakeLmdbName(), CCleanupApp::x_OpenOStream(), CSeqDBAliasNode::x_ResolveNames(), CVDBAliasNode::x_ResolveVDBList(), and CElementaryMatching::x_WriteIndexFile().

◆ GetPtr() [1/2] void * CMemoryFileSegment::GetPtr ( void  ) const inline ◆ GetPtr() [2/2] void * CMemoryFile::GetPtr ( void  ) const inline

Get pointer to beginning of data.

Returns
Pointer to start of data.
See also
Map, Extend

Definition at line 4291 of file ncbifile.hpp.

References CMemoryFile::m_Ptr.

Referenced by CDbIndex_Impl< LEGACY >::CDbIndex_Impl(), CMemoryFile::Extend(), CSeqDBLMDB::GetOidsForTaxIds(), CProfileData::Load(), s_ContainsBinaryNumericIdList(), s_GetMinimumSupportedWordSizeByIndex(), SeqDB_ReadBinaryGiList(), SeqDB_ReadGiList(), SeqDB_ReadMixList(), SeqDB_ReadPigList(), SeqDB_ReadSiList(), SeqDB_ReadTaxIdList(), and SeqDB_ReadTiList().

◆ GetRealOffset()

Get real offset of the mapped area from beginning of file.

This real offset is adjusted to system's memory allocation granularity value and can be less than requested "offset" in the constructor.

Returns
Offset in bytes of mapped area from beginning of the file. Always return adjusted value even if data was not successfully mapped.
See also
GetRealPtr, GetRealSize, GetOffset

Definition at line 4239 of file ncbifile.hpp.

References CMemoryFileSegment::m_OffsetReal.

◆ GetRealPtr() void * CMemoryFileSegment::GetRealPtr ( void  ) const inline

Get pointer to beginning of really mapped data.

When the mapping object is creating and the offset is not a multiple of the allocation granularity, that offset and length can be adjusted to match it. The "length" value will be automatically increased on the difference between passed and real offsets.

Returns
See also
GetRealOffset, GetRealSize, GetPtr

Definition at line 4226 of file ncbifile.hpp.

References CMemoryFileSegment::m_DataPtrReal.

◆ GetRealSize() size_t CMemoryFileSegment::GetRealSize ( void  ) const inline ◆ GetSize() [1/3] size_t CMemoryFileMap::GetSize ( void *  ptr ) const inline ◆ GetSize() [2/3] size_t CMemoryFileSegment::GetSize ( void  ) const inline ◆ GetSize() [3/3] size_t CMemoryFile::GetSize ( void  ) const inline

Get length of the mapped region.

Returns

Definition at line 4297 of file ncbifile.hpp.

References CMemoryFileMap::GetFileSize(), CMemoryFileMap::GetSize(), CMemoryFile::m_Ptr, and CMemoryFile::x_Verify().

Referenced by s_ContainsBinaryNumericIdList(), SeqDB_ReadBinaryGiList(), SeqDB_ReadGiList(), SeqDB_ReadMixList(), SeqDB_ReadPigList(), SeqDB_ReadSiList(), SeqDB_ReadTaxIdList(), SeqDB_ReadTiList(), and CVDBAliasNode::x_ReadValues().

◆ GetTime() bool CDirEntry::GetTime ( CTimemodification, CTimelast_access = 0, CTimecreation = 0  ) const

Get time stamp(s) of a directory entry.

The creation time under MS windows is an actual creation time of the entry. Under UNIX "creation" time is the time of last entry status change. If either OS or file system does not support some time type (modification/last access/creation), then the corresponding CTime gets returned "empty". Returned times are always in CTime's time zone format (eLocal/eGMT). NOTE that what GetTime returns may not be equal to the the time(s) previously set by SetTime, as the behavior depends on the OS and the file system used.

Returns
TRUE if time(s) obtained successfully, FALSE otherwise.
See also
GetTimeT, SetTime, Stat

Definition at line 1840 of file ncbifile.cpp.

References _T_XCSTRING, buf, CDirEntry::GetPath(), HANDLE, INVALID_HANDLE_VALUE, LOG_ERROR, LOG_ERROR_WIN, s_FileTimeToCTime(), CTime::SetNanoSecond(), CTime::SetTimeT(), st(), and CDirEntry::Stat().

Referenced by CNCHeartBeat::CheckConfFile(), g_IsDataFileOld(), CDirEntry::IsNewer(), CDbapiTestSpeedApp::RunSample(), and CDirEntry::SetTime().

◆ GetTimeT() bool CDirEntry::GetTimeT ( time_t *  modification, time_t *  last_access = 0, time_t *  creation = 0  ) const ◆ GetTmpDir() string CDir::GetTmpDir ( void  ) static ◆ GetTmpName()

Get temporary file name.

This class generates a temporary file name in the temporary directory specified by the OS. But this behavior can be changed – just set the desired temporary directory using the global parameter 'TmpDir' in in the 'NCBI' registry section or the environment (see CParam class description), and it will used by default in this class.

Parameters
mode Temporary file creation mode. Note, that default mode eTmpFileGetName returns only the name of the temporary file, without creating it. This method can be faster, but it have potential race condition, when other process can leave as behind and create file with the same name first. Also, please note, that if you call GetTmpName() again, without creating file for previous call of this method, the same file name can be returned.
Returns
Name of temporary file, or "kEmptyStr" if there was an error getting temporary file name.
See also
GetTmpNameEx, ETmpFileCreationMode

Definition at line 2903 of file ncbifile.cpp.

References _T_CSTRING, ERR_POST_X, CDirEntry::eTmpFileCreate, free(), CDirEntry::GetTmpNameEx(), kEmptyStr, LOG_ERROR_ERRNO, NcbiSys_tempnam, and Warning().

Referenced by BOOST_AUTO_TEST_CASE(), CDirEntry::CreateTmpFile(), CTmpFile::CTmpFile(), CGBDocument::LoadFile(), CMakefilePatch::PatchTreeMakefiles(), s_GetBigBedFeats(), s_GetBigBedSummary(), s_GetData(), CBrowserUtils::SendToBrowser(), sRunTest(), CMsvcConfigure::WriteBuildVer(), CBLASTSeqToolJob::x_CreateProjectItems(), CWigGraph::x_GetBigWigData(), CWigGraph::x_GetBigWigSummary(), and CFlat2AsnApp::x_OpenFiles().

◆ GetTmpNameEx()

Get temporary file name.

Parameters
dir Directory in which temporary file is to be created; default of kEmptyStr means that function try to get application specific temporary directory name from global parameter (see GetTmpName description), then it try to get system temporary directory, and all of this fails - current directory will be used. prefix Temporary file name will be prefixed by value of this parameter; default of kEmptyStr means that, effectively, no prefix value will be used. mode Temporary file creation mode. If set to "eTmpFileCreate", empty file with unique name will be created. Please, do not forget to remove it yourself as soon as it is no longer needed. On some platforms "eTmpFileCreate" mode is equal to "eTmpFileGetName". If set to "eTmpFileGetName", returns only the name of the temporary file, without creating it. This method can be faster, but it have potential race condition, when other process can leave as behind and create file with the same name first.
Returns
Name of temporary file, or "kEmptyStr" if there was an error getting temporary file name.
See also
GetTmpName, ETmpFileCreationMode

Definition at line 2940 of file ncbifile.cpp.

References CFileIO::Close(), CFileIO::CreateTemporary(), CFileIO::eDoNotRemove, CFileIO::eRemoveInClose, CDirEntry::eTmpFileCreate, and CFileIO::GetPathname().

Referenced by CAlignSort::CAlignSort(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CPrintOptions::CPrintOptions(), CDirEntry::CreateTmpFileEx(), g_SaveToTemp(), CDirEntry::GetTmpName(), CBrowserUtils::SendToBrowser(), and CArchive::x_ExtractEntry().

◆ GetTotalDiskSpace()

Get total disk space information.

Get information for the user associated with the calling thread only. If per-user quotas are in use, then the returned value may be less than the actual total number of bytes on the disk.

Parameters
path String that specifies the file system for which to return the total disk space in bytes.
Returns
The amount of total disk space in bytes.
See also
GetFileSystemInfo, GetFreeDiskSpace, GetUsedDiskSpace

Definition at line 5342 of file ncbifile.cpp.

References fFSI_DiskSpace, info, and s_GetFileSystemInfo().

◆ GetType() [1/2]

Get a type of a directory entry by status information.

Parameters
st Status file information.
Returns
Return one of the values in EType. If the directory entry does not exist, return "eUnknown".
See also
IsFile, IsDir, IsLink

Definition at line 2247 of file ncbifile.cpp.

References CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CDirEntry::eDir, CDirEntry::eDoor, CDirEntry::eFile, CDirEntry::eLink, CDirEntry::ePipe, CDirEntry::eSocket, CDirEntry::eUnknown, if(), int, NCBI_IS_TYPE, and st().

◆ GetType() [2/2]

Get a type of a directory entry.

Returns
Return one of the values in EType. If the directory entry does not exist, return "eUnknown".
See also
IsFile, IsDir, IsLink

Definition at line 2203 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::eDir, CDirEntry::eFile, eFollowLinks, CDirEntry::eUnknown, F_ISSET, CDirEntry::GetPath(), NcbiSys_stat, s_Win_IsNetworkPath(), CNcbiError::SetFromErrno(), CNcbiError::SetFromWindowsError(), and st().

Referenced by CDirEntry::Copy(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), g_FindDataFile(), CArchiveZip::GetEntryInfo(), CFile::GetLength(), CDirEntry::IsDir(), CDirEntry::IsFile(), CDirEntry::IsLink(), CDirEntry::Rename(), s_PositionAsString(), CDirEntry::SetOwner(), CTar::x_Append(), CArchive::x_Append(), and CTar::x_ExtractEntry().

◆ GetUmask() ◆ GetUsedDiskSpace()

Get used disk space information.

Get information for the user associated with the calling thread only. If per-user quotas are in use, then the returned values may be less than the actual number of free bytes available on disk.

Parameters
path String that specifies the file system for which to return the number of used bytes on disk.
Returns
The amount of used space in bytes.
See also
GetFileSystemInfo, GetTotalDiskSpace, GetFreeDiskSpace

Definition at line 5334 of file ncbifile.cpp.

References fFSI_DiskSpace, info, and s_GetFileSystemInfo().

◆ IsAbsolutePath()

Check if a "path" is absolute for the current OS.

Note that the "path" must be for the current OS.

Definition at line 508 of file ncbifile.cpp.

References s_Win_IsDiskPath(), and s_Win_IsNetworkPath().

Referenced by CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CInterProcessLock::CInterProcessLock(), CMsvcPrjFilesCollector::CollectSources(), CDirEntry::CreateAbsolutePath(), SMakeProjectT::CreateIncludeDirs(), CDirEntry::CreateRelativePath(), CRemoteAppLauncher::CRemoteAppLauncher(), CDirEntry::DereferenceLink(), SMsvcProjectT::DoCreate(), CNcbiApplicationAPI::FindProgramExecutablePath(), g_FindDataFile(), CProjectsLstFileFilter::InitFromFile(), CMsvcSite::IsLibOk(), MakeAbsolutePath(), CProjBulderApp::ParseArguments(), CSearchHelper::ReadModFiles(), CProjBulderApp::RegisterProjectWatcher(), CProjBulderApp::ReportGeneratedFiles(), CExec::ResolvePath(), CSplignApp::Run(), COmssa2pepxmlApplication::Run(), CGffDeconcatApp::Run(), s_ProcessParameters(), s_StoreStartupParams(), s_ToArchiveName(), s_ToFilesystemPath(), SetLogFileName(), CFileHandleDiagHandler::SetLogName(), CFileDiagHandler::SetLogName(), and CMetaRegistry::x_FindRegistry().

◆ IsAbsolutePathEx() ◆ IsDir()

Check whether a directory entry is a directory.

See also
GetType

Definition at line 3956 of file ncbifile.hpp.

References CDirEntry::eDir, and CDirEntry::GetType().

Referenced by CLDS2_Manager::AddDataDir(), BOOST_AUTO_TEST_CASE(), CDir::Copy(), CDir::Exists(), CIgBlastArgs::ExtractAlgorithmOptions(), FindFilesInDir(), CwxSavePdfBaseDlg::OnFilepathClick(), CwxExportAlnmultiImgDlg::OnFilepathClick(), CwxExportVectorImageDlg::OnFilepathClick(), CAgpConverter::OutputOneFileForEach(), CProjectTreeBuilder::ProcessDir(), CDirEntry::Remove(), CDir::Remove(), CConcatSeqEntriesApplication::Run(), CAsnCacheDumpSeqIdsApplication::Run(), CReadIndexSpeedApp::Run(), CAsnSubCacheCreateApplication::Run(), CDirEntry::SetMode(), CDir::SetMode(), TraverseAndRunTestCases(), and CDiscRepApp::x_ParseDirectory().

◆ IsFile()

Check whether a directory entry is a file.

See also
GetType

Definition at line 3950 of file ncbifile.hpp.

References CDirEntry::eFile, and CDirEntry::GetType().

Referenced by CLDS2_Manager::AddDataDir(), CFile::Exists(), CIgBlastArgs::ExtractAlgorithmOptions(), CProjBulderApp::FindDepGraph(), CTableImportDataSource::LoadTable(), SGridWorkerNodeImpl::OfflineRun(), CMacroFlowEditor::OnSaveCopies(), CTestNameToInfoMapLoader::operator()(), CFlatFileParser::Parse(), FileMessenger::PollMessageFile(), CAttribTableDelimitersPanel::PreviewData(), CTableFormatPanel::PreviewData(), NVcfUtil::RemoveFile(), CSequenceEditingEventHandler::SaveSubmissionFile(), and CFileManifest::Validate().

◆ IsIdentical() ◆ IsLink() bool CDirEntry::IsLink ( void  ) const inline ◆ IsNewer() [1/3] ◆ IsNewer() [2/3]

Check if the current entry is newer than some other.

Parameters
path An entry name, of which to compare the modification times.
Returns
TRUE if the modification time of the current entry is newer than the modification time of the specified entry, or if that entry doesn't exist. Return FALSE otherwise.
See also
GetTime, EIfAbsent2

Definition at line 2657 of file ncbifile.cpp.

References CDirEntry::fHasThisNoPath_Newer, CDirEntry::fHasThisNoPath_NotNewer, CDirEntry::fNoThisHasPath_Newer, CDirEntry::fNoThisHasPath_NotNewer, CDirEntry::fNoThisNoPath_Newer, CDirEntry::fNoThisNoPath_NotNewer, CDirEntry::GetTime(), and NCBI_THROW.

◆ IsNewer() [3/3]

Check if the current entry is newer than a specified date/time.

Parameters
tm Time to compare with the current entry modification time. if_absent What to do if If the entry does not exist or is not accessible.
Returns
TRUE if the entry's modification time is newer than specified time. Return FALSE otherwise.
See also
GetTime, EIfAbsent

Definition at line 2700 of file ncbifile.cpp.

References CDirEntry::eIfAbsent_Newer, CDirEntry::eIfAbsent_NotNewer, CDirEntry::eIfAbsent_Throw, CDirEntry::GetTimeT(), and NCBI_THROW.

Referenced by CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CDirEntry::Rename(), CMsvcConfigure::WriteBuildVer(), and CWorkspaceAutoSaver::x_SaveWorkspace().

◆ IsPathSeparator() bool CDirEntry::IsPathSeparator ( const char  c ) static ◆ IsSupported() bool CMemoryFile_Base::IsSupported ( void  ) static ◆ Lock()

Lock file.

Lock whole file, or the part of the file. Previous lock will be removed. It do not remove locks, established on the file somewhere else. Throw CFileException if the lock cannot be obtained (since someone else has it locked already), or on error.

Parameters
type Type of the lock, one of eShared or eExclusive. offset The file offset where lock starts. Cannot accept values less than 0. length Number of bytes to lock. The value 0 means that whole file will be locked.
See also
Unlock

Definition at line 7324 of file ncbifile.cpp.

References CFileLock::eExclusive, CFileLock::eShared, flags, SLock::length_hi, SLock::length_lo, CFileLock::m_Handle, CFileLock::m_IsLocked, CFileLock::m_Lock, NCBI_THROW, offset, SLock::offset_hi, SLock::offset_lo, SLock::Reset(), SEEK_SET, TRUE, and CFileLock::Unlock().

Referenced by CFileLock::x_Init().

◆ LookupLink() string CDirEntry::LookupLink ( void  ) const

Get an entry name that a link points to.

Returns
The real entry name that the link points to. Return an empty string if the entry is not a link, or cannot be dereferenced. The dereferenced name can be another symbolic link.
See also
GetType, IsLink, DereferenceLink

Definition at line 2343 of file ncbifile.cpp.

References _T_XCSTRING, buf, CDirEntry::GetPath(), int, kEmptyStr, and PATH_MAX.

Referenced by CDirEntry::DereferenceLink(), CTar::x_Append(), and CArchive::x_Append().

◆ MakeModeT()

Construct mode_t value from permission modes.

Parameters must not have "fDefault" values.

See also
ModeFromModeT

Definition at line 1193 of file ncbifile.cpp.

References CDirEntry::fExecute, CDirEntry::fRead, CDirEntry::fSetGID, CDirEntry::fSetUID, CDirEntry::fSticky, and CDirEntry::fWrite.

Referenced by CDiagFileHandleHolder::CDiagFileHandleHolder(), CDirEntry::GetDefaultModeT(), CInterProcessLock::Lock(), CFileIO::Open(), CDirEntry::SetModeEntry(), and CDirEntry::SetUmask().

◆ MakePath()

Assemble a path from basic components.

Parameters
dir The directory component to make the path string. This will always have a terminating path separator (example: "/usr/local/"). base The base name of the file component that is used to make up the path. ext The extension component. This will always be added with a leading dot (input of either "bat" or ".bat" gets added to the path as ".bat").
Returns
Path built from the components.

Definition at line 413 of file ncbifile.cpp.

References CDirEntry::AddTrailingPathSeparator().

Referenced by BDB_CreateEnv(), BOOST_AUTO_TEST_CASE(), CBDB_Cache::Close(), CNSStartIDs::CNSStartIDs(), CMsvcPrjFilesCollector::CollectSources(), CDirEntry::CopyToDir(), CPIDGuard::CPIDGuard(), createAnnot(), CSQLITE3_BlobCacheCF::CreateInstance(), CDirEntry::DereferenceLink(), DeserializePauseState(), DeserializeRefuseSubmitState(), CAliasTest::DoTest(), CSrzPath::FindAccPath(), FindBlastDbPath(), FindFilesInDir(), CNcbiApplicationAPI::FindProgramExecutablePath(), g_FindDataFile(), CSeqDB::GetDiskUsage(), CSplitCacheApp::GetFileName(), CNetScheduleServer::InitNodeID(), CCSraDb::MakeSraIdPart(), CDirEntry::MoveToDir(), CMultiFileDestination::Next(), CWGSDb_Impl::NormalizePathOrAccession(), SGridWorkerNodeImpl::OfflineRun(), CBDB_Cache::Open(), CAgpConverter::OutputOneFileForEach(), CBam2GraphApp::ProcessFile(), CBiosampleChkApp::ProcessOneDirectory(), CBam2GraphApp::ProcessSrz(), DTDParser::PushEntityLexer(), CExec::ResolvePath(), CCleanupApp::Run(), CMultiReaderApp::Run(), CTLSApp::Run(), s_DereferencePath(), s_GetFileName(), s_GetIndexFileName(), s_InitFileName(), s_LoadECNumberTable(), s_ReadStorageParams(), s_UpdateMacros(), SerializePauseState(), SerializeRefuseSubmitState(), CNcbiEncrypt::sx_InitKeyMap(), CAsnvalApp::ValidateOneDirectory(), WriteASNToFile(), CAliasTest::x_CheckFile(), CDiscRepApp::x_ConstructOutputName(), CQueueDataBase::x_CreateCrashFlagFile(), CQueueDataBase::x_CreateDumpErrorFlagFile(), CQueueDataBase::x_DoesCrashFlagFileExist(), CQueueDataBase::x_DoesDumpErrorFlagFileExist(), CDownloadJob::x_DownloadAndExtract(), CMetaRegistry::x_FindRegistry(), CNetStorageServer::x_GetCrashFlagFileName(), CNcbiEncrypt::x_GetDomainKeys(), CBamUILoadManager::x_GetSrzRefSeqs(), CCSRAFileInfo::x_Initialize(), CGICacheReader::x_Initialize(), CCleanupApp::x_OpenOStream(), CCleanupApp::x_ProcessOneDirectory(), CQueueDataBase::x_RemoveCrashFlagFile(), and CQueueDataBase::x_RemoveDumpErrorFlagFile().

◆ Map() [1/2] void * CMemoryFileMap::Map ( TOffsetType  offset, size_t  length  )

Map file segment.

Parameters
offset The file offset where mapping is to begin. If the offset is not a multiple of the allocation granularity, that it can be decreased to match it. The "length" value will be automatically increased on the difference between passed and real offsets. The real offset can be obtained using GetRealOffset(). Cannot accept values less than 0. length Number of bytes to map. This value can be increased if "offset" is not a multiple of the allocation granularity. The real length of mapped region can be obtained using GetRealSize() method. The value 0 means that all file size will be mapped.
Returns
See also
Unmap, GetOffset, GetSize, GetRealOffset, GetRealSize
Note
MS Windows: If file is open in eMMP_Read mode with eMMS_Private protection, that memory pages will be mapped in exclusive mode, and any other process cannot access the same file for writing.

Definition at line 5784 of file ncbifile.cpp.

References get_limits(), CMemoryFileMap::GetFileSize(), CMemoryFileSegment::GetPtr(), SMemoryFileHandle::hMap, NStr::Int8ToString(), kInvalidHandle, CMemoryFileMap::m_Attrs, CMemoryFileMap::m_FileName, CMemoryFileMap::m_Handle, CMemoryFileMap::m_Segments, max(), NCBI_THROW, and offset.

Referenced by CMemoryFile::Map(), s_ConvertV4toV5(), CMMapByteSourceReader::x_GetNextChunkAt(), and CPagedFile::x_ReadPage().

◆ Map() [2/2] void * CMemoryFile::Map ( TOffsetType  offset = 0, size_t  length = 0  )

Map file.

Parameters
offset The file offset where mapping is to begin. If the offset is not a multiple of the allocation granularity, that it can be decreased to match it. The "length" value will be automatically increased on the difference between passed and real offsets. The real offset can be obtained using GetRealOffset(). Cannot accept values less than 0. length Number of bytes to map. This value can be increased if "offset" is not a multiple of the allocation granularity. The real length of mapped region can be obtained using GetRealSize() method. The value 0 means that file will be mapped from 'offset' to the end of file.
Returns
See also
Unmap, GetPtr, GetOffset, GetSize, Extend

Definition at line 6125 of file ncbifile.cpp.

References CMemoryFile::m_Ptr, CMemoryFileMap::Map(), offset, and CMemoryFile::Unmap().

Referenced by CMemoryFile::CMemoryFile(), CMemoryFile::Extend(), CElementaryMatching::x_InitFilteringVector(), CElementaryMatching::x_InitParticipationVector(), CVDBAliasNode::x_ReadValues(), and CElementaryMatching::x_Search().

◆ MatchesMask() [1/3]

Match a "name" against a set of "masks" Note that any name match to empty set of masks.

Definition at line 3984 of file ncbifile.hpp.

References mask.

◆ MatchesMask() [2/3] ◆ MatchesMask() [3/3] ◆ MemMapAdvise() [1/3] ◆ MemMapAdvise() [2/3] ◆ MemMapAdvise() [3/3] ◆ MemMapAdviseAddr() bool CMemoryFile_Base::MemMapAdviseAddr ( void *  addr, size_t  len, EMemMapAdvise  advise  ) inlinestatic

Advise on memory map usage for specified region.

Parameters
addr Address of memory region whose usage is being advised. len Length of memory region whose usage is being advised. advise Advise on expected memory usage pattern.
Returns
See also
EMemMapAdvise, MemMapAdvise

Definition at line 4197 of file ncbifile.hpp.

References len, and MemoryAdvise().

Referenced by CMemoryFileSegment::MemMapAdvise().

◆ ModeFromModeT()

Convert mode_t to permission mode(s).

Note
On WINDOWS: There is only the "user_mode" permission setting, and "group_mode" and "other_mode" settings will be ignored. The "user_mode" will be combined with effective permissions for the current process owner on specified directory entry.
See also
GetMode, SetMode, MakeModeT

Definition at line 1246 of file ncbifile.cpp.

References CDirEntry::fExecute, CDirEntry::fRead, CDirEntry::fSetGID, CDirEntry::fSetUID, CDirEntry::fSticky, and CDirEntry::fWrite.

Referenced by CArchiveEntryInfo::GetMode(), CDirEntry::GetMode(), CDirEntry::GetUmask(), operator<<(), CDirEntry::SetModeEntry(), and CArchive::x_RestoreAttrs().

◆ ModeToString()

Convert permission modes to string representation using one of predefined formats.

Parameters must not have "fDefault" values.

See also
StringToMode, EModeStringFormat

Definition at line 1355 of file ncbifile.cpp.

References _TROUBLE, CDirEntry::eGroup, CDirEntry::eModeFormat_List, CDirEntry::eModeFormat_Octal, CDirEntry::eModeFormat_Symbolic, CDirEntry::eOther, CDirEntry::eUser, format, CDirEntry::fSetGID, CDirEntry::fSetUID, CDirEntry::fSticky, i, out(), and CDirEntry::x_ModeToSymbolicString().

Referenced by operator<<(), and CDirEntry::SetModeEntry().

◆ MoveToDir() ◆ NCBI_EXCEPTION_DEFAULT() [1/2] ◆ NCBI_EXCEPTION_DEFAULT() [2/2] ◆ New() [1/3] ◆ New() [2/3] ◆ New() [3/3] ◆ NormalizePath()

Normalize a path.

Remove from an input "path" all redundancy, and if possible, convert it to more simple form for the current OS. Note that "path" must be OS-specific.

Parameters
follow_links Whether to follow symlinks (shortcuts, aliases)

Definition at line 820 of file ncbifile.cpp.

References buf, NStr::CompareNocase(), CDirEntry::DeleteTrailingPathSeparator(), DIR_CURRENT, DIR_PARENT, DIR_SEPARATOR, DISK_SEPARATOR, eIgnoreLinks, ERR_POST_X, CNcbiError::eTooManySymbolicLinkLevels, head, int, NStr::Join(), kEmptyStr, kSep, last(), next(), NPOS, PATH_MAX, NStr::ReplaceInPlace(), CNcbiError::Set(), NStr::Split(), string, and Warning().

Referenced by CSimpleMakeFileContents::SParser::AcceptLine(), CFileDeleteList::Add(), CMsvcPrjProjectContext::AdditionalIncludeDirectories(), CAlignSort::CAlignSort(), CAsnCache::CAsnCache(), CAsnCacheStore::CAsnCacheStore(), CMsvcPrjProjectContext::CMsvcPrjProjectContext(), CMsvcPrjFilesCollector::CollectExtra(), CMsvcPrjFilesCollector::CollectResources(), CMsvcPrjFilesCollector::CollectSources(), CDirEntry::ConvertToOSPath(), CDirEntry::CreateAbsolutePath(), SMakeProjectT::CreateIncludeDirs(), CRemoteAppLauncher::CRemoteAppLauncher(), CDirEntry::DereferenceLink(), CDirEntry::DereferencePath(), SAsnProjectSingleT::DoCreate(), SAsnProjectMultipleT::DoCreate(), SAppProjectT::DoCreate(), CIgBlastArgs::ExtractAlgorithmOptions(), FindBlastDbPath(), CNcbiApplicationAPI::FindProgramExecutablePath(), CSeqDBAtlas::GenerateSearchPath(), GetAbsolutePath(), CFileManifest::GetAllFilePaths(), CMsvcProjectMakefile::GetCustomBuildInfo(), CMsvcSite::GetLibChoiceIncludes(), CDirEntry::GetNearestExistingParentDir(), CNcbiArguments::GetProgramName(), CProjBulderApp::Init(), CDirEntry::IsIdentical(), CDataToolGeneratedSrc::LoadFrom(), MakeAbsolutePath(), ParentDir(), CProjBulderApp::ParseArguments(), CProjectTreeBuilder::ProcessDir(), CExec::ResolvePath(), CSplignApp::Run(), CAsnSubCacheCreateApplication::Run(), s_AddProjItemToDll(), s_CreateThirdPartyLibsInstallMakefile(), s_GetMakefileIncludes(), s_ProcessParameters(), s_StoreStartupParams(), s_ToFilesystemPath(), SetLogFileName(), CDiagContext::SetupDiag(), CSeqDBAliasNode::x_ExpandAliases(), CArchive::x_ExtractEntry(), CMetaRegistry::x_FindRegistry(), CSeqDBAliasNode::x_ResolveNames(), CArchive::x_RestoreAttrs(), and CDataLoadersUtil::x_SetupLDS2DataLoader().

◆ Open()

Open file.

Definition at line 6414 of file ncbifile.cpp.

References _T_XCSTRING, _TROUBLE, CFileIO_Base::eCreate, CFileIO_Base::eCreateNew, CFileIO_Base::eExclusive, CFileIO_Base::eOpen, CFileIO_Base::eOpenAlways, CFileIO_Base::eRead, CFileIO_Base::eReadWrite, CFileIO_Base::eShare, CFileIO_Base::eShareRead, CFileIO_Base::eShareWrite, CFileIO_Base::eTruncate, CFileIO_Base::eWrite, CFile::Exists(), flags, CDirEntry::fRead, CDirEntry::fWrite, kInvalidHandle, CFileIO::m_AutoClose, CFileIO::m_Handle, CFileIO::m_Pathname, CDirEntry::MakeModeT(), NCBI_THROW, NcbiSys_open, NcbiSys_strerror, NULL, and WIN_LAST_ERROR_STR.

Referenced by CFileReader::CFileReader(), CFileReaderWriter::CFileReaderWriter(), CFileWriter::CFileWriter(), CFile::Compare(), CPagedFile::CPagedFile(), CGlShader::CreateShader(), CFileIO::CreateTemporary(), CVCFVariantList::CVCFVariantList(), NVcfUtil::DeserializeColumn(), CArchiveMemory::Load(), NVcfUtil::PrintToFile(), CArchiveMemory::Save(), CColumnarVCFReaderApp::x_ReadVCFBlob(), and CTestBMApp::x_Serialize().

◆ operator()() [1/3] ◆ operator()() [2/3] ◆ operator()() [3/3]

Definition at line 6346 of file ncbifile.cpp.

References NStr::CompareCase(), SCompareDirEntries::eBase, SCompareDirEntries::eDir, SCompareDirEntries::eExt, SCompareDirEntries::eName, SCompareDirEntries::ePath, i, SCompareDirEntries::m_Sort, NCBI_THROW, CDirEntry::SplitPath(), and UNDEFINED_SORT_MODE.

◆ operator=() [1/11] ◆ operator=() [2/11] ◆ operator=() [3/11] ◆ operator=() [4/11] ◆ operator=() [5/11] ◆ operator=() [6/11] ◆ operator=() [7/11] ◆ operator=() [8/11] ◆ operator=() [9/11] ◆ operator=() [10/11] ◆ operator=() [11/11] ◆ PendingCount() [1/2] ERW_Result CFileReader::PendingCount ( size_t *  count ) virtual

Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.

Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.

Implements IReader.

Definition at line 6999 of file ncbifile.cpp.

References eRW_NotImplemented.

◆ PendingCount() [2/2] ERW_Result CFileReaderWriter::PendingCount ( size_t *  count ) virtual

Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.

Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.

Implements IReader.

Definition at line 7150 of file ncbifile.cpp.

References eRW_NotImplemented.

◆ Read() [1/3] size_t CFileIO::Read ( void *  buf, size_t  count  ) const

Read file.

Returns
The number of bytes actually read. Can be less than 'count', zero indicates end of file.

Definition at line 6660 of file ncbifile.cpp.

References buf, count, kMax, CFileIO::m_Handle, max(), n, NCBI_THROW, and NULL.

Referenced by CFile::Compare(), CGlShader::CreateShader(), CVCFVariantList::CVCFVariantList(), NVcfUtil::DeserializeColumn(), CArchiveMemory::Load(), CFileReader::Read(), CFileReaderWriter::Read(), CNetCacheReader::Read(), CNetCacheWriter::UploadCacheFile(), CPagedFile::x_ReadPage(), and CColumnarVCFReaderApp::x_ReadVCFBlob().

◆ Read() [2/3] ERW_Result CFileReader::Read ( void *  buf, size_t  count, size_t *  bytes_read = 0  ) virtual

Virtual methods from IReader.

Implements IReader.

Definition at line 6976 of file ncbifile.cpp.

References buf, count, eRW_Eof, eRW_Error, eRW_Success, CErrnoTemplExceptionEx< TBase, PErrCode, PErrStr >::GetErrno(), CFileReaderWriter_Base::m_File, n, CFileIO::Read(), and CNcbiError::SetErrno().

◆ Read() [3/3] ERW_Result CFileReaderWriter::Read ( void *  buf, size_t  count, size_t *  bytes_read = 0  ) virtual

Virtual methods from IReaderWriter.

Implements IReader.

Definition at line 7126 of file ncbifile.cpp.

References buf, count, eRW_Eof, eRW_Error, eRW_Success, CErrnoTemplExceptionEx< TBase, PErrCode, PErrStr >::GetErrno(), CFileReaderWriter_Base::m_File, n, CFileIO::Read(), and CNcbiError::SetErrno().

◆ Remove() [1/2]

Remove a directory entry.

@flags Entry processing flags. See EProcessingFlags and CDir::Remove() for details.

See also
CDir::Remove, EProcessingFlags

Reimplemented in CDir.

Definition at line 2595 of file ncbifile.cpp.

References CDirEntry::eEntryOnly, eIgnoreLinks, CDirEntry::fDir_All, CDirEntry::fDir_Recursive, flags, CDirEntry::GetPath(), CDirEntry::IsDir(), CDir::Remove(), and CDirEntry::RemoveEntry().

Referenced by BOOST_AUTO_TEST_CASE(), CBDB_Env::CleanLog(), CBDB_Cache::Close(), CFile::Copy(), CSymLink::Copy(), CLDS2_Database::Create(), CTmpStream::CTmpStream(), CWriteDB_ConsolidateAliasFiles(), CTmpEntryDeleter::Delete(), DeleteBlastDb(), CSQLITE_Connection::DeleteDatabase(), CTable2AsnContext::DeleteOutputs(), CDelayedOfstream::Discard(), g_RestoreFromTemp(), CProjBulderApp::GenerateUnixProjects(), CAutoOutputFileReset::GetStream(), CAlignSort::MergeSortedFiles(), CMacroFlowEditor::OnSaveCopies(), CBDB_Cache::Open(), CSQLITE3_Cache::Open(), CMakefilePatch::PatchTreeMakefiles(), PostProcessFile(), CTbl2AsnApp::ProcessOneFile(), CTAbleValApp::ProcessOneFile(), PromoteIfDifferent(), CPIDGuard::Release(), CDir::Remove(), CPIDGuard::Remove(), CNetStorageServer::RemoveCrashFlagFile(), NVcfUtil::RemoveFile(), CDirEntry::Rename(), CTarTempDirEntry::Restore(), CRotatingLogStreamBuf::Rotate(), CFlat2AsnApp::Run(), CCacheIndexCopyApp::Run(), s_CreateAliasFilePriv(), s_OpenIndexDB(), s_ReinitializeStorage(), s_RemoveFile(), s_ResetLibInstallKey(), s_UnlockInstanceGuard(), s_UpdateMacros(), CSequenceEditingEventHandler::SaveSubmissionFile(), SerializePauseState(), SerializeRefuseSubmitState(), CAlignSort::SortAlignments(), sRunTest(), CSequenceEditingEventHandler::TableReaderClipboard(), CEditingBtnsPanel::TableReaderFromClipboard(), CCodeGenerator::UndoGenerateCode(), STempFileLocker::Unlock(), CMsvcConfigure::WriteBuildVer(), CBamLoadingJob::x_CreateDataLoader(), CBLASTSeqToolJob::x_CreateProjectItems(), CImportFeatTable::x_DoImportFeaturesFromClipboard(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), CBDB_Cache::x_DropOverflow(), CBuildDatabase::x_EndBuild(), CTar::x_ExtractSparseFile(), CQueueDataBase::x_RemoveCrashFlagFile(), CQueueDataBase::x_RemoveDumpErrorFlagFile(), CQueueDataBase::x_RemoveSpaceReserveFile(), CElementaryMatching::x_Search(), CMakeProfileDBApp::~CMakeProfileDBApp(), COutputFileHelper::~COutputFileHelper(), CTarTempDirEntry::~CTarTempDirEntry(), CTmpStream::~CTmpStream(), CWriteDB_LMDB::~CWriteDB_LMDB(), and CWriteDB_TaxID::~CWriteDB_TaxID().

◆ Remove() [2/2]

Delete existing directory.

Parameters
flags Directory processing flags. Some popular sets of flags combined together and listed below:
Returns
TRUE if operation successful; FALSE otherwise.
See also
CDirEntry::Remove, EProcessingFlags

Reimplemented from CDirEntry.

Definition at line 4340 of file ncbifile.cpp.

References _ASSERT, _T_XCSTRING, eIgnoreLinks, CDirEntry::eOnlyEmpty, f, CDirEntry::fDir_All, CDirEntry::fDir_Files, CDirEntry::fDir_Recursive, CDirEntry::fDir_Self, CDirEntry::fDir_Subdirs, CDirEntry::fEntry, CDirEntry::fIgnoreMissing, flags, CDirEntry::fModeAdd, CDirEntry::fModeNoChange, CDirEntry::fProcessAll, CDirEntry::fWrite, CDirEntry::GetPath(), CDirEntry::GetPathSeparator(), CDirEntry::IsDir(), ITERATE, LOG_ERROR, LOG_ERROR_ERRNO, NcbiSys_rmdir, CDirEntry::Remove(), CDir::Remove(), and CDirEntry::SetMode().

Referenced by BDB_CreateEnv(), CDir::Copy(), CFileDBEngine::DropDB(), CBDB_Cache::Open(), CDirEntry::Remove(), CDir::Remove(), CAsnSubCacheCreateApplication::Run(), CSeqAnnotSplicerApp::Run(), CRemoteAppRequest::x_CreateWDir(), CQueueDataBase::x_Open(), CQueueDataBase::x_RemoveDump(), and CRemoteAppRequest::x_RemoveWDir().

◆ RemoveEntry()

Remove a directory entry.

Same as Remove(), but removes current entry only. Don't process entries inside directories.

See also
Remove

Definition at line 2606 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::fDefault, CDirEntry::fIgnoreMissing, flags, CDirEntry::GetPath(), LOG_ERROR_ERRNO, NCBI, NCBI_PARAM_TYPE, NcbiSys_remove, and CDirEntry::SetModeEntry().

Referenced by CFile::Copy(), CDirEntry::Remove(), and CDirEntry::Rename().

◆ Rename()

Rename entry.

Parameters
new_path New path/name of an entry. flags Flags specifying how to rename the entry.
Returns
TRUE if the operation was completed successfully; FALSE, otherwise. NOTE that if flag fRF_Update is set, the function returns TRUE and just removes the current entry in case when destination entry exists and has its modification time newer than the current entry.
See also
ERenameFlags, Copy

Definition at line 2456 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::Backup(), CDirEntry::CreateObject(), CDirEntry::DereferenceLink(), CDirEntry::eBackup_Rename, CDirEntry::eFile, CNcbiError::eNoSuchFileOrDirectory, CNcbiError::eOperationNotPermitted, CDirEntry::eRecursive, CDirEntry::eUnknown, CDirEntry::Exists(), F_ISSET, CDirEntry::fCF_PreserveAll, CDirEntry::fCF_Recursive, flags, CDirEntry::fRF_Backup, CDirEntry::fRF_EqualTypes, CDirEntry::fRF_FollowLinks, CDirEntry::fRF_Overwrite, CDirEntry::fRF_Update, CDirEntry::GetBackupSuffix(), CDirEntry::GetPath(), CDirEntry::GetType(), CDirEntry::IsNewer(), LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, NcbiSys_rename, CDirEntry::Remove(), CDirEntry::RemoveEntry(), CDirEntry::Reset(), and tmp.

Referenced by CDirEntry::Backup(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CDirEntry::MoveToDir(), PromoteIfDifferent(), CWriteDB_File::RenameFileIndex(), CWriteDB_File::RenameSingle(), CTarTempDirEntry::Restore(), CRotatingLogStreamBuf::Rotate(), CQueueDataBase::x_BackupDump(), and CDownloadJob::x_DownloadAndExtract().

◆ Reset()

Reset path string.

Definition at line 298 of file ncbifile.cpp.

References CDirEntry::DeleteTrailingPathSeparator(), DISK_SEPARATOR, CDirEntry::IsPathSeparator(), len, and CDirEntry::m_Path.

Referenced by CChunkFile::Append(), CSeqIdChunkFile::Append(), CDirEntry::CDirEntry(), CMultiFileSource::CMultiFileSource(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CPrintOptions::CPrintOptions(), CDirEntry::DereferenceLink(), CDirEntry::DereferencePath(), FindFilesInDir(), g_FindDataFile(), CDirEntry::GetNearestExistingParentDir(), SGridWorkerNodeImpl::OfflineRun(), CSeqIdChunkFile::OpenForRead(), CChunkFile::OpenForRead(), CChunkFile::OpenForWrite(), CSeqIdChunkFile::OpenForWrite(), CTAbleValApp::ProcessOneFile(), CDirEntry::Rename(), s_DereferencePath(), and CCodeGenerator::UndoGenerateCode().

◆ SCompareDirEntries() [1/3] SCompareDirEntries::SCompareDirEntries ( ESort  s1, ESort  s2  ) ◆ SCompareDirEntries() [2/3] ◆ SCompareDirEntries() [3/3] SCompareDirEntries::SCompareDirEntries ( ESort  s1 = ePath ) ◆ SetAutoClose() void CFileIO::SetAutoClose ( bool  auto_close = true ) inline ◆ SetAutoRemove() ◆ SetBackupSuffix() void CDirEntry::SetBackupSuffix ( const char *  suffix ) inlinestatic ◆ SetCwd() ◆ SetDefaultMode() ◆ SetDefaultModeGlobal()

Set default permission modes globally for all CDirEntry objects.

The default mode is set globally for all CDirEntry objects except for those having their own mode set with individual SetDefaultMode().

When "fDefault" is passed as a value of the mode parameters, the default mode takes places for the value as defined in EType:

If user_mode is "fDefault", then the default is to take

If group_mode is "fDefault", then the default is to take

If other_mode is "fDefault", then the default is to take

Definition at line 1094 of file ncbifile.cpp.

References CDirEntry::eDir, CDirEntry::eGroup, CDirEntry::eOther, CDirEntry::eSpecial, CDirEntry::eUnknown, CDirEntry::eUser, CDirEntry::fDefault, CDirEntry::fDefaultDirGroup, CDirEntry::fDefaultDirOther, CDirEntry::fDefaultDirUser, CDirEntry::fDefaultGroup, CDirEntry::fDefaultOther, CDirEntry::fDefaultUser, and CDirEntry::m_DefaultModeGlobal.

◆ SetDeleteList() ◆ SetDeleteReadOnlyFiles() void CFileAPI::SetDeleteReadOnlyFiles ( ESwitch  on_off_default ) static

Specify whether read-only files can be deleted via CDirEntry::Remove() on Windows.

Have the same effect as DeleteReadOnlyFiles global parameter: Registry file: [NCBI] DeleteReadOnlyFiles = true/false Environment variable: NCBI_CONFIG__DELETEREADONLYFILES

Parameters
on_off_default When set to eOn, allows read-only files to be deleted. Otherwise, an attempt to delete a read-only files will return an error (EACCES).
Note
Windows only.

Definition at line 7424 of file ncbifile.cpp.

References eOn, NCBI, and NCBI_PARAM_TYPE.

Referenced by CGridWorkerApp::Init().

◆ SetFileHandle() ◆ SetFilePos() [1/2]

Set file position.

Parameters
offset Defines a number of bytes to move the file pointer. A positive value moves the pointer from the position indicated by 'whence' forward in the file, and a negative value backspaces the file pointer towards the beginning of the file. whence Defines a pointer move origin.

Definition at line 6811 of file ncbifile.cpp.

References _TROUBLE, CFileIO_Base::eBegin, CFileIO_Base::eCurrent, CFileIO_Base::eEnd, NStr::Int8ToString(), NStr::IntToString(), CFileIO::m_Handle, NCBI_THROW, NcbiSys_lseek, NULL, offset, SEEK_CUR, SEEK_END, SEEK_SET, and TRUE.

◆ SetFilePos() [2/2] void CFileIO::SetFilePos ( Uint8  position ) const ◆ SetFileSize()

Set new size for the file.

This method can be used to truncate or extend the file.

Note
The file must be opened with write access rights. Function repositions the offset of the file descriptor to the EOF.
Parameters
length New file size. If the file was previously longer than length, bytes past "length" will no longer be accessible. If it was shorter, the contents of the file between the old EOF position and the new position are not defined. Usually it will be read in as zeros, but this depends on the OS. pos Defines how to set current file position after changing file size. eCurrent means that file position does not change, eBegin and eEnd move it to the start or the end of the file accordingly.

Definition at line 6878 of file ncbifile.cpp.

References CFileIO_Base::eBegin, CFileIO_Base::eCurrent, CFileIO::m_Handle, NCBI_THROW, NULL, NStr::NumericToString(), s_FTruncate(), and CFileIO::SetFilePos().

Referenced by s_LockInstanceGuard().

◆ SetHonorUmask() void CFileAPI::SetHonorUmask ( ESwitch  on_off_default ) static

Enable or disable honoring umask settings on Unix for newly created files/directories in the File API.

Have the same effect as FileAPIHonorUmask global parameter: Registry file: [NCBI] FileAPIHonorUmask = true/false Environment variable: NCBI_CONFIG__FILEAPIHONORUMASK

Parameters
on_off_default When set to eOn, allows read-only files to be deleted. Otherwise, an attempt to delete a read-only files will return an error (EACCES).
Note
Unix only. On Windows umask affect only CRT function, the part of API that use Windows API directly just ignore umask setting.

Definition at line 7417 of file ncbifile.cpp.

References DEFAULT_HONOR_UMASK_VALUE, eDefault, eOff, NCBI, and NCBI_PARAM_TYPE.

◆ SetList() ◆ SetLogging() void CFileAPI::SetLogging ( ESwitch  on_off_default ) static

Enable or disable logging of errors from the File API classes.

Have the same effect as FileAPILogging global parameter: Registry file: [NCBI] FileAPILogging = true/false Environment variable: NCBI_CONFIG__FILEAPILOGGING

Parameters
on_off_default Switch between logging enabled (eOn), disabled (eOff), or reset to the default state (currently disabled).

Definition at line 7410 of file ncbifile.cpp.

References DEFAULT_LOGGING_VALUE, eDefault, eOff, NCBI, and NCBI_PARAM_TYPE.

Referenced by CReadIndexSpeedApp::Run().

◆ SetMode() [1/2]

Set permission mode(s) of a directory entry.

Permissions are set as specified by the passed values for user_mode, group_mode and other_mode. This method rewrites each user/group/other/special permission by default.

Note
Adding one of the EModeRelative flags to mode change default behavior that replace modes with passed values and allow for relative mode change for any of user/group/other/special. It is possible to keep it as is, or add/remove some permission modes specified in parameters.
Passing fDefault will cause the corresponding mode to be taken and set from its default setting. @flags Entry processing flags. Affect directories only, see CDir::SetMode() for details. For other type entris don't have any effect.
Returns
TRUE if permission successfully set; FALSE, otherwise.
See also
SetDefaultMode, SetDefaultModeGlobal, GetMode, EMode, EModeRelative, ESpecialModeBits, SetModeEntry, CDir::SetMode, EProcessingFlags

Reimplemented in CDir.

Definition at line 1014 of file ncbifile.cpp.

References _ASSERT, CDirEntry::eEntryOnly, eIgnoreLinks, CDirEntry::fDir_All, CDirEntry::fDir_Recursive, CDirEntry::fEntry, flags, CDirEntry::GetPath(), CDirEntry::IsDir(), CDir::SetMode(), and CDirEntry::SetModeEntry().

Referenced by CDir::Remove(), s_LockInstanceGuard(), CArchive::x_RestoreAttrs(), and CTar::x_RestoreAttrs().

◆ SetMode() [2/2]

Set permission mode(s) for a directory.

Permissions are set as specified by the passed values for user_mode, group_mode and other_mode. This method rewrites each user/group/other/special permission by default.

Note
Adding one of the EModeRelative flags to mode change default behavior that replace modes with passed values and allow for relative mode change for any of user/group/other/special. It is possible to keep it as is, or add/remove some permission modes specified in parameters.
Passing "fDefault" will cause the corresponding mode to be taken and set from its default setting.
Parameters
flags Directory processing flags. Some popular sets of flags combined together and listed below:
Returns
TRUE if permissions successfully set for all entries; FALSE, otherwise.
See also
SetMode, SetDefaultMode, SetDefaultModeGlobal, EMode, EModeRelative, EProcessingFlags

Reimplemented from CDirEntry.

Definition at line 4457 of file ncbifile.cpp.

References _ASSERT, CDirEntry::eEntryOnly, eIgnoreLinks, f, CDirEntry::fDir_All, CDirEntry::fDir_Files, CDirEntry::fDir_Recursive, CDirEntry::fDir_Self, CDirEntry::fDir_Subdirs, CDirEntry::fEntry, flags, CDirEntry::fProcessAll, CDirEntry::GetPath(), CDirEntry::GetPathSeparator(), CDirEntry::IsDir(), ITERATE, LOG_ERROR, CDir::SetMode(), and CDirEntry::SetModeEntry().

Referenced by CDir::Copy(), CDirEntry::SetMode(), and CDir::SetMode().

◆ SetModeEntry()

Set permission mode(s) of a directory entry.

Same as SetMode(), but process current entry only. Don't process entries inside directories.

See also
SetMode

Definition at line 1030 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::eGroup, CDirEntry::eOther, CDirEntry::eSpecial, CDirEntry::eUser, CDirEntry::fDefault, CDirEntry::fIgnoreMissing, flags, CDirEntry::fModeAdd, CDirEntry::fModeNoChange, CDirEntry::fModeRemove, CDirEntry::GetPath(), LOG_ERROR_ERRNO, CDirEntry::m_DefaultMode, CDirEntry::MakeModeT(), CDirEntry::ModeFromModeT(), CDirEntry::ModeToString(), NcbiSys_chmod, NcbiSys_stat, st(), and UPDATE_PERMS.

Referenced by CDirEntry::RemoveEntry(), CDirEntry::SetMode(), and CDir::SetMode().

◆ SetOwner()

Set an entry owner and/or group.

You should have administrative (super user) rights to change an owner or group. WINDOWS: Only administrative privileges (Restore and Take Ownership) grant rights to change ownership. Without one of the privileges, an administrator cannot take ownership of any file or give ownership back to the same user. UNIX: The owner of an entry can change the group to any group, of which that owner is a member. The super-user may assign the group arbitrarily.

Parameters
owner New owner name to set. Use empty string if don't want to change. group New group name to set. Use empty string if don't want to change. uid Pointer to an unsigned int to receive numeric user id of the prospective owner (this information is purely supplemental). gid Pointer to an unsigned int to receive numeric group id of the prospective owner (this information is purely supplemental).
Note
Numeric uid/gid can be returned even if the call was unsuccessful; they may be fake ones on Windows (and may be 0).
Returns
TRUE if successful, FALSE otherwise.
See also
GetOwner

Definition at line 2818 of file ncbifile.cpp.

References eFollowLinks, eIgnoreLinks, CNcbiError::eInvalidArgument, CDirEntry::eLink, NStr::fConvErr_NoThrow, CUnixFeature::GetGroupGIDByName(), CDirEntry::GetPath(), CDirEntry::GetType(), CUnixFeature::GetUserUIDByName(), int, LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_NCBI, CWinSecurity::SetFileOwner(), CNcbiError::SetFromErrno(), and NStr::StringToNumeric().

Referenced by s_CopyAttrs(), CArchive::x_RestoreAttrs(), and CTar::x_RestoreAttrs().

◆ SetTime()

Set time stamp(s) of a directory entry.

The process must own the file or have write permissions in order to change the time(s). Any parameter with a value of zero will not cause the corresponding time stamp change. NOTE that what GetTime can later return may not be equal to the the time(s) set by SetTime, as the behavior depends on the OS and the file system used. Also, on UNIX it is impossible to change creation time of an entry (we silently ignore the "creation" time stamp on that platform).

Parameters
modification Entry modification time to set. last_access Entry last access time to set. It cannot be less than the entry creation time, otherwise it will be set equal to the creation time. creation Entry creation time to set. On some platforms it cannot be changed, so this parameter will be quietly ignored.
Returns
TRUE if the time(s) changed successfully, FALSE otherwise.
See also
SetTimeT, GetTime

Definition at line 1901 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::GetPath(), CDirEntry::GetTime(), CDirEntry::GetTimeT(), CTime::GetTimeT(), HANDLE, INVALID_HANDLE_VALUE, kMicroSecondsPerSecond, kNanoSecondsPerSecond, LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_WIN, CTime::NanoSecond(), NULL, s_UnixTimeToFileTime(), and TV_USEC.

Referenced by CTar::x_RestoreAttrs().

◆ SetTimeT() bool CDirEntry::SetTimeT ( const time_t *  modification = 0, const time_t *  last_access = 0, const time_t *  creation = 0  ) const

Set time stamp(s) of a directory entry (time_t version).

Use SetTime() if you need precision of more than 1 second.

Parameters
modification Entry modification time to set. creation Entry creation time to set. On some platforms it cannot be changed, so this parameter will be quietly ignored. last_access Entry last access time to set. It cannot be less than the entry creation time, otherwise it will be set equal to the creation time.
Returns
TRUE if the time(s) changed successfully, FALSE otherwise.
See also
SetTime, GetTimeT

Definition at line 2039 of file ncbifile.cpp.

References _T_XCSTRING, CDirEntry::GetPath(), CDirEntry::GetTimeT(), HANDLE, INVALID_HANDLE_VALUE, LOG_ERROR, LOG_ERROR_ERRNO, LOG_ERROR_WIN, NULL, and s_UnixTimeToFileTime().

Referenced by CArchive::x_RestoreAttrs().

◆ SetUmask() ◆ SplitPath()

Split a path string into its basic components.

Parameters
path Path string to be split. dir The directory component that is returned. This will always have a terminating path separator (example: "/usr/local/"). base File name with both directory (if any) and extension (if any) parts stripped. ext The extension component (if any), always has a leading dot (example: ".bat").

Definition at line 358 of file ncbifile.cpp.

References ALL_SEPARATORS, kEmptyStr, and NPOS.

Referenced by CMsvcConfigure::AnalyzeDefines(), CNcbiApplicationAPI::AppMain(), BDB_CreateEnv(), CBlastKmerBuildIndex::Build(), CBDB_SplitCursor< BDB_SplitStore, BDB_Vol >::CBDB_SplitCursor(), CMsvcMetaMakefile::CMsvcMetaMakefile(), CMsvcPrjProjectContext::CMsvcPrjProjectContext(), CMsvcProjectMakefile::CMsvcProjectMakefile(), CMsvcPrjFilesCollector::CollectSources(), CFile::Copy(), CDir::Copy(), CSymLink::Copy(), CPIDGuard::CPIDGuard(), CDirEntry::CreateAbsolutePath(), CreateConfigurableFile(), CProjectItemsTree::CreateFrom(), CSQLITE3_BlobCacheCF::CreateInstance(), CDirEntry::CreateRelativePath(), CNcbiApplicationAPI::FindProgramExecutablePath(), CTable2AsnContext::GenerateOutputFilename(), CNcbiApplicationAPI::GetAppName(), CBamLoadOptionPanel::GetBamFilePath(), CDirEntry::GetBase(), CSeqDBLMDBSet::GetDBFileNames(), CDirEntry::GetDir(), CDirEntry::GetExt(), GetLocalBaseName(), CDirEntry::GetName(), CMsvcMetaMakefile::GetUsePchThroughHeader(), CTestBMApp::Init(), IsProducedByDatatool(), CMetaRegistry::Load(), CTbl2AsnApp::LoadAdditionalFiles(), CNcbiApplicationAPI::LoadConfig(), CDataToolGeneratedSrc::LoadFrom(), CMultiReader::LoadIndexedAnnot(), CBlastFormat::LogBlastSearchInfo(), CCSraDb::MakeSraIdPart(), CBamLoadOptionPanel::OnButtonClick(), CSQLITE3_Cache::Open(), SCompareDirEntries::operator()(), PSourcesExclude::operator()(), ReplaceExt(), CExec::ResolvePath(), COmssa2pepxmlApplication::Run(), s_AddProjItemToDll(), s_CollectRelPathes(), s_CreateThirdPartyLibsInstallMakefile(), s_FileName_less(), s_GetBaseName(), s_GetProgramPath(), s_IsInsideDatatoolSourceDir(), CSQLITE3_Cache::SameCacheParams(), CBamLoadOptionPanel::SetIndexFiles(), CTable2AsnContext::SetSeqId(), SourceFileExt(), CDllResolver::TryCandidate(), SNetStorage::SConfig::Validate(), CMsvcConfigure::WriteBuildVer(), CMsvcConfigure::WriteExtraDefines(), CCdFromFasta::WriteToFile(), CBamLoadingJob::x_CreateDataLoader(), CMetaRegistry::x_FindRegistry(), CMagicBlastApp::x_LogBlastSearchInfo(), CRegexpTemplateTester::x_Op_Include(), and CWiggleExportJob::x_RecalculateGraph().

◆ SplitPathEx()

Split a path string into its basic components.

Note that the arguments are not OS-specific.

Parameters
path Path string to be split. disk Disk name if present like "C:" (MS Windows paths only), otherwise empty string. dir The directory component that is returned. This will always have a terminating path separator (example: "/usr/local/"). base File name with both directory (if any) and extension (if any) parts stripped. ext The extension component (if any), always has a leading dot (example: ".bat").

Definition at line 380 of file ncbifile.cpp.

References ALL_OS_SEPARATORS, isalpha(), kEmptyStr, and NPOS.

Referenced by FindFiles().

◆ Stat()

Get status information on a dir entry.

By default have the same behavior as UNIX's lstat().

Parameters
buffer Pointer to structure that stores results. follow_links Whether to follow symlinks (shortcuts, aliases).
Returns
Return TRUE if the file-status information is obtained, FALSE otherwise (errno may be set).

Definition at line 2111 of file ncbifile.cpp.

References _T_XCSTRING, buffer, eFollowLinks, CDirEntry::GetPath(), LOG_ERROR_ERRNO, and NcbiSys_stat.

Referenced by CDirEntry::GetTime(), CDirEntry::IsIdentical(), s_CopyAttrs(), CTar::x_Append(), CArchive::x_Append(), and CTar::x_ProcessEntry().

◆ StringToMode()

Convert string (in one of predefined formats, detects automatically) to permission mode(s).

Returns
TRUE if the operation was completed successfully; FALSE, otherwise.
See also
ModeToString, EModeStringFormat

Definition at line 1400 of file ncbifile.cpp.

References CNcbiError::eInvalidArgument, NStr::fConvErr_NoThrow, CDirEntry::fExecute, CDirEntry::fRead, CDirEntry::fSetGID, CDirEntry::fSetUID, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CDirEntry::fSticky, CDirEntry::fWrite, i, isdigit(), ITERATE, NPOS, CNcbiError::Set(), NStr::Split(), NStr::SplitInTwo(), and NStr::StringToUInt().

◆ Unlock() void CFileLock::Unlock ( void  )

Unlock file.

Unlock range of the file previously locked using Lock() method. The file remains open. Note, that this method cannot remove locks, established on the file somewhere else. Only closing a file can unlock all locks.

See also
Lock

Definition at line 7368 of file ncbifile.cpp.

References SLock::length_hi, SLock::length_lo, CFileLock::m_Handle, CFileLock::m_IsLocked, CFileLock::m_Lock, NCBI_THROW, SLock::offset_hi, SLock::offset_lo, SEEK_SET, and TRUE.

Referenced by CFileLock::Lock(), and CFileLock::~CFileLock().

◆ Unmap() [1/3] bool CMemoryFileMap::Unmap ( void *  ptr ) ◆ Unmap() [2/3] bool CMemoryFileSegment::Unmap ( void  ) ◆ Unmap() [3/3] bool CMemoryFile::Unmap ( void  ) ◆ UnmapAll() bool CMemoryFileMap::UnmapAll ( void  ) ◆ Write() [1/3] size_t CFileIO::Write ( const void *  buf, size_t  count  ) const

Write file.

Always write all 'count' bytes of data to the file.

Returns
The number of bytes written; equal to 'count'.

Definition at line 6707 of file ncbifile.cpp.

References buf, count, kMax, CFileIO::m_Handle, max(), n, NCBI_THROW, and NULL.

Referenced by CNetCacheReader::CNetCacheReader(), NVcfUtil::PrintToFile(), s_LockInstanceGuard(), CArchiveMemory::Save(), CFileWriter::Write(), CFileReaderWriter::Write(), CNetCacheWriter::Write(), and CTestBMApp::x_Serialize().

◆ Write() [2/3] ERW_Result CFileWriter::Write ( const void *  buf, size_t  count, size_t *  bytes_written = 0  ) virtual

Virtual methods from IWriter.

Implements IWriter.

Definition at line 7053 of file ncbifile.cpp.

References buf, count, eRW_Error, eRW_Success, CErrnoTemplExceptionEx< TBase, PErrCode, PErrStr >::GetErrno(), CFileReaderWriter_Base::m_File, n, CNcbiError::SetErrno(), and CFileIO::Write().

Referenced by CBDB_Cache::Open().

◆ Write() [3/3] ERW_Result CFileReaderWriter::Write ( const void *  buf, size_t  count, size_t *  bytes_written = 0  ) virtual

Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device.

Always store the number of bytes actually written, or 0 if "count" has been passed as 0 ("buf" must be ignored in this case), via the "bytes_written" pointer, if provided non-NULL. Note that the method can return non-eRW_Success in case of an I/O error along with indicating (some) data delivered to the output device (and reflected in "*bytes_written").

Note
Apparently, may not return eRW_Success if hasn't been able to write "count" bytes as requested, and "bytes_written" was passed as NULL.
When returning "*bytes_written" as zero for a non-zero "count" requested, the return status should not indicate eRW_Success.
Warning
"*bytes_written" may never be returned greater than "count".
Attention
It is implementation-dependent whether the call blocks until the entire buffer or only some data has been written out. In general, it is advised that this call is made within a loop that checks for errors and proceeds with the writing until the required amount of data has been sent.

Implements IWriter.

Definition at line 7156 of file ncbifile.cpp.

References buf, count, eRW_Error, eRW_Success, CErrnoTemplExceptionEx< TBase, PErrCode, PErrStr >::GetErrno(), CFileReaderWriter_Base::m_File, n, CNcbiError::SetErrno(), and CFileIO::Write().

◆ x_Close() void CMemoryFileMap::x_Close ( void  ) protected ◆ x_Create() void CMemoryFileMap::x_Create ( Uint8  size ) protected

Create new file or rewrite existent with zeros.

Definition at line 6029 of file ncbifile.cpp.

References _T_STDSTRING, _T_XCSTRING, SMemoryFileAttrs::file_access, CMemoryFileMap::m_Attrs, CMemoryFileMap::m_FileName, NCBI_THROW, NcbiSys_close, NcbiSys_creat, NcbiSys_strerror, s_FExtend(), and ncbi::grid::netcache::search::fields::size.

Referenced by CMemoryFileMap::CMemoryFileMap().

◆ x_Extend() void CMemoryFileMap::x_Extend ( Uint8  size, Uint8  new_size  ) protected

Extend file size from 'size' to 'new_size' with zero bytes.

Note, that 'new_size' should be greater that current file size 'size'.

Definition at line 6060 of file ncbifile.cpp.

References _T_STDSTRING, _T_XCSTRING, CMemoryFileMap::m_FileName, NCBI_THROW, NcbiSys_close, NcbiSys_open, NcbiSys_strerror, s_FExtend(), and ncbi::grid::netcache::search::fields::size.

Referenced by CMemoryFileMap::CMemoryFileMap(), and CMemoryFile::Extend().

◆ x_GetMemoryFileSegment() ◆ x_Init()

Auxiliary method for constructors.

Definition at line 7267 of file ncbifile.cpp.

References _T_XCSTRING, F_CLEAN_REDUNDANT, F_ISSET, CFileLock::fAutoUnlock, CFileLock::fLockLater, CFileLock::fLockNow, CFileLock::fNoAutoUnlock, kInvalidHandle, CFileLock::Lock(), CFileLock::m_CloseHandle, CFileLock::m_Flags, CFileLock::m_Handle, CFileLock::m_Lock, NCBI_THROW, NcbiSys_open, NULL, and offset.

Referenced by CFileLock::CFileLock().

◆ x_ModeToSymbolicString() ◆ x_Open() void CMemoryFileMap::x_Open ( void  ) protected

Open file mapping for file with name m_FileName.

Definition at line 5891 of file ncbifile.cpp.

References _T_XCSTRING, _T_XSTRING, SMemoryFileAttrs::file_access, SMemoryFileAttrs::file_share, HANDLE, SMemoryFileHandle::hMap, INVALID_HANDLE_VALUE, kInvalidHandle, CMemoryFileMap::m_Attrs, CMemoryFileMap::m_FileName, CMemoryFileMap::m_Handle, SMemoryFileAttrs::map_access, SMemoryFileAttrs::map_protect, NCBI_THROW, NcbiSys_open, NcbiSys_strerror, NULL, SMemoryFileHandle::sFileName, WIN_LAST_ERROR_STR, and CMemoryFileMap::x_Close().

Referenced by CMemoryFileMap::CMemoryFileMap(), and CMemoryFile::Extend().

◆ x_Verify() [1/2] void CMemoryFileSegment::x_Verify ( void  ) const private ◆ x_Verify() [2/2] void CMemoryFile::x_Verify ( void  ) const private ◆ ~CDir() ◆ ~CDirEntry() CDirEntry::~CDirEntry ( void  ) virtual ◆ ~CFile() ◆ ~CFileDeleteList() CFileDeleteList::~CFileDeleteList ( ) ◆ ~CFileIO() CFileIO::~CFileIO ( void  ) ◆ ~CFileLock() CFileLock::~CFileLock ( void  ) ◆ ~CMemoryFileMap() CMemoryFileMap::~CMemoryFileMap ( void  ) ◆ ~CMemoryFileSegment() CMemoryFileSegment::~CMemoryFileSegment ( void  ) ◆ ~CSymLink() CSymLink::~CSymLink ( void  ) virtual ◆ ~CTmpFile() CTmpFile::~CTmpFile ( void  ) ◆ atime_nsec long CDirEntry::SStat::atime_nsec ◆ block_size unsigned long CFileUtil::SFileSystemInfo::block_size ◆ ctime_nsec long CDirEntry::SStat::ctime_nsec ◆ filename_max unsigned long CFileUtil::SFileSystemInfo::filename_max

Maximum filename length (part between slashes)

Definition at line 2227 of file ncbifile.hpp.

◆ free_space Uint8 CFileUtil::SFileSystemInfo::free_space ◆ fs_type ◆ kInvalidHandle

Definition at line 116 of file ncbifile.hpp.

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

◆ m_Attrs ◆ m_AutoClose bool CFileIO::m_AutoClose protected ◆ m_AutoRemove ◆ m_BackupSuffix const char * CDirEntry::m_BackupSuffix = ".bak" staticprivate ◆ m_CloseHandle bool CFileLock::m_CloseHandle private ◆ m_DataPtr void* CMemoryFileSegment::m_DataPtr private ◆ m_DataPtrReal void* CMemoryFileSegment::m_DataPtrReal private ◆ m_DefaultMode TMode CDirEntry::m_DefaultMode[4] private ◆ m_DefaultModeGlobal ◆ m_File CFileIO CFileReaderWriter_Base::m_File protected

Definition at line 3629 of file ncbifile.hpp.

Referenced by CFileReader::CFileReader(), CFileReaderWriter::CFileReaderWriter(), CFileWriter::CFileWriter(), CFileWriter::Flush(), CFileReaderWriter::Flush(), CFileReaderWriter_Base::GetFileHandle(), CFileReaderWriter_Base::GetFileIO(), CFileReader::Read(), CFileReaderWriter::Read(), CFileWriter::Write(), and CFileReaderWriter::Write().

◆ m_FileName [1/2] ◆ m_FileName [2/2] string CMemoryFileMap::m_FileName protected ◆ m_FileNames ◆ m_Flags ◆ m_Handle [1/3] ◆ m_Handle [2/3]

System file handle.

Definition at line 3599 of file ncbifile.hpp.

Referenced by CFileIO::Close(), CFileIO::CreateTemporary(), CFileIO::Flush(), CFileIO::GetFileHandle(), CFileIO::GetFilePos(), CFileIO::GetFileSize(), CFileIO::Open(), CFileIO::Read(), CFileIO::SetFileHandle(), CFileIO::SetFilePos(), CFileIO::SetFileSize(), CFileIO::Write(), and CFileIO::~CFileIO().

◆ m_Handle [3/3] ◆ m_InFile ◆ m_IsLocked bool CFileLock::m_IsLocked private ◆ m_Length size_t CMemoryFileSegment::m_Length private ◆ m_LengthReal size_t CMemoryFileSegment::m_LengthReal private ◆ m_Lock ◆ m_Offset ◆ m_OffsetReal ◆ m_OutFile ◆ m_Path ◆ m_Pathname ◆ m_Paths TList CFileDeleteList::m_Paths private ◆ m_Ptr ◆ m_RemoveOnDestruction ◆ m_Segments ◆ m_Sort int SCompareDirEntries::m_Sort[3] private ◆ mtime_nsec long CDirEntry::SStat::mtime_nsec ◆ orig

Original stat structure.

Definition at line 824 of file ncbifile.hpp.

Referenced by CTarUserEntryInfo::CTarUserEntryInfo(), CTarEntryInfo::GetCreationCTime(), CTarEntryInfo::GetCreationTime(), CTarEntryInfo::GetGroupId(), CTarEntryInfo::GetLastAccessCTime(), CTarEntryInfo::GetLastAccessTime(), CTarEntryInfo::GetMajor(), CTarEntryInfo::GetMinor(), CTarEntryInfo::GetMode(), CTarEntryInfo::GetModificationCTime(), CTarEntryInfo::GetModificationTime(), CTarEntryInfo::GetSize(), CTarEntryInfo::GetUserId(), CDirEntry::IsIdentical(), CTar::x_Append(), CTar::x_ExtractEntry(), CTar::x_ParsePAXData(), CTar::x_ProcessEntry(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().

◆ total_space Uint8 CFileUtil::SFileSystemInfo::total_space ◆ used_space Uint8 CFileUtil::SFileSystemInfo::used_space ◆ CMemoryFile

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4