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] ◆ TProcessingFlagsBinary OR of "EProcessingFlags".
Definition at line 754 of file ncbifile.hpp.
◆ TRemoveFlagsFlags based on TProcessingFlags.
Definition at line 757 of file ncbifile.hpp.
◆ TRenameFlags ◆ TSegments ◆ TSetModeFlags ◆ TSpecialModeBits ◆ EAccessModeWhich I/O operations permitted on the file.
Enumerator eReadFile can be read.
eWriteFile can be written.
eReadWriteFile can be read and written.
Definition at line 3444 of file ncbifile.hpp.
◆ EAllowReadWhich operations to allow on temporary file.
Enumerator eAllowReadAllow read and write.
eWriteOnlyAllow write only.
Definition at line 1481 of file ncbifile.hpp.
◆ EAutoRemoveControls how temporary file is removed.
Enumerator eDoNotRemoveDo not ever remove temporary file.
eRemoveInCloseRemove temporary file immediately after closing its handle in Close().
eRemoveASAPRemove the file at the earliest possible moment (in CreateTemporary() on UNIX).
Definition at line 3498 of file ncbifile.hpp.
◆ EBackupModeBackup modes.
Enumerator eBackup_CopyCopy entry.
eBackup_RenameRename entry.
eBackup_DefaultDefault mode.
Definition at line 667 of file ncbifile.hpp.
◆ ECompareTextMode to compare streams in text form.
Enumerator eIgnoreEolSkip end-of-line characters ('\r' and '
')
Skip white spaces (in terms of isspace(), including end-of-line)
eIgnoreWsDefinition at line 1665 of file ncbifile.hpp.
◆ ECopyFlagsCopy 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_OverwriteThe following flags define what to do when the destination entry already exists:
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_TopDirOnlyAll 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_EqualTypesIf destination entry exists, it must have the same type as source.
fCF_FollowLinksCopy entries following their sym.links, not the links themselves.
fCF_VerifyVerify data after copying.
fCF_PreserveOwnerPreserve owner/group.
fCF_PreservePermPreserve permissions/attributes.
fCF_PreserveTimePreserve date/times.
fCF_PreserveAll fCF_RecursiveCopy recursively (for dir only)
fCF_SkipUnsupportedSkip all entries for which we don't have Copy() method.
fCF_DefaultDefault flags.
Definition at line 531 of file ncbifile.hpp.
◆ ECreateFlagsFlags for Create()/CreatePath()
Default directory creation mode.
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_PermAsParentUse same permissions as parent directory (umask ignored)
fCreate_ErrorIfExistsError, if directory already exists.
All other existent entry with the same name (including symbolic links to directory) lead to an error by default.
fCreate_UpdateIfExistsAllow 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 eTmpFileDefinition at line 139 of file ncbifile.hpp.
◆ EErrCode [2/2]Error types.
Enumerator eFile eFileSystemInfo eFileLock eFileIODefinition at line 168 of file ncbifile.hpp.
◆ EFileSystemTypeUnix: 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 eUnknownFile system type could not be determined.
eADFSAcorn's Advanced Disc Filing System.
eAdvFSTru64 UNIX Advanced File System.
eAFFSAmiga Fast File System.
eAFSAFS File System.
eAUTOFSAutomount File System.
eBEFSThe Be (BeOS) File System (BeFS)
eBFSBoot File System.
eCacheFSCache File System.
eCryptFSeCryptfs (Enterprise Cryptographic Filesystem)
eCDFSISO 9660 CD-ROM file system (CDFS/ISO9660)
eCIFSCommon Internet File System.
eCODACoda File System.
eCOHCoherent (System V)
eCRAMFSCompressed ROMFS.
eDebugFSDebug File System (Linux)
eDEVFSDevice File System.
eDFSDCE Distributed File System (DCE/DFS)
eEFSThe Encrypting File System (EFS) (MSWin)
eEXOFSEXtended Object File System (EXOFS)
eExtExtended file system.
eExt2Second Extended file system.
eExt3Journalled form of ext2.
eFATTraditional 8.3 MSDOS-style file system.
eFAT32FAT32 file system.
eFDFSFile Descriptor File System.
eFFMFile-on-File Mounting file system.
eFFSFast File System (*BSD)
eFUSEFilesystem in Userspace (FUSE)
eFUSE_CTLFusectl (helper filesystem for FUSE)
eGFS2Global File System.
eGPFSIBM General Parallel File System.
eHFSHierarchical File System.
eHFSPLUSHierarchical File System.
eHPFSOS/2 High-Performance File System.
eHSFSHigh Sierra File System.
eJFSJournalling File System.
eJFFSJournalling Flash File System.
eJFFS2Journalling Flash File System v2.
eLOFSLoopback File System.
eMFSMemory File System.
eMinixMinix v1.
eMinix2Minix v2.
eMinix3Minix v3.
eMSFSMail Slot File System.
eNCPFSNetWare Core Protocol File System.
eNFSNetwork File System (NFS)
eNTFSNew Technology File System.
eOCFS2Oracle Cluster File System 2.
eOPENPROM/proc/openprom filesystem
ePANFSPanasas FS.
ePROC/proc file system
ePVFS2Parallel Virtual File System.
eReiserFSReiser File System.
eRFSRemote File Share file system (AT&T RFS)
eQNX4QNX4 file system.
eROMFSROM File System.
eSELINUXSecurity-Enhanced Linux (SELinux)
eSMBFSSamba File System.
eSPECFSSPECial File System.
eSquashFSCompressed read-only filesystem (Linux)
eSYSFS(Linux)
eSYSV2System V.
eSYSV4System V.
eTMPFSVirtual Memory File System (TMPFS/SHMFS)
eUBIFSThe Unsorted Block Image File System.
eUDFUniversal Disk Format.
eUFSUNIX File System.
eUFS2UNIX File System.
eUSBDEVICEUSBDevice file system.
eV7UNIX V7 File System.
eVxFSVERITAS File System (VxFS)
eVZFSVirtuozzo File System (VZFS)
eXENIXXenix (SysV) file system.
eXFSXFS File System.
eXIAFSDefinition at line 2140 of file ncbifile.hpp.
◆ EFindFilesFile finding flags.
Enumerator fFF_Filefind files
fFF_Dirfind directories
fFF_Allfind files and directories (used automatically if fFF_File or fFF_Dir has not specified)
fFF_Recursivedescend into sub-dirs
fFF_Nocasecase-insensitive name search
fFF_Defaultdefault behavior
Definition at line 3017 of file ncbifile.hpp.
◆ EFlagsFlags, used in constructors.
Default flag in each group have priority above non-default, if they are used together.
Enumerator fLockNowLock file using parameters specified in constructor.
fLockLater fAutoUnlockAutomatically 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 fDefaultDefault flags.
Definition at line 3805 of file ncbifile.hpp.
◆ EGetEntriesFlagsFlags for GetEntries()
Suppress "self recursive" elements (the directories "." and "..").
fCreateObjectsCreate appropriate subclasses of CDirEntry (CFile,CDir,...), not just CDirEntry objects.
fNoCaseIgnore upper and lower-case differences when doing a mask comparison.
Makes the mask case-insensitive.
fIgnorePathReturn only names of entries, not their full paths.
fThrowOnErrorThrows an exceptions on error, instead of returning empty/null value.
eAllEntriesWill be removed in the future. Do not use.
eIgnoreRecursiveWill be removed in the future. Do not use.
Definition at line 1764 of file ncbifile.hpp.
◆ EHomeWindowsWindows 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.
Try env var APPDATA% first.
eHomeWindows_UserProfileTry env var USERPROFILE% first.
Definition at line 1726 of file ncbifile.hpp.
◆ EIfAbsentWhat IsNewer() should do if the dir entry does not exist or is not accessible.
Throw an exception.
eIfAbsent_NewerDeem absent entry to be "newer".
eIfAbsent_NotNewerDeem absent entry to be "older".
Definition at line 992 of file ncbifile.hpp.
◆ EIfAbsent2What 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).
Definition at line 1037 of file ncbifile.hpp.
◆ EIfEmptyPathWhat GetDir() should return if the dir entry does not contain path.
Return empty string.
eIfEmptyPath_CurrentReturn current dir like "./".
Definition at line 329 of file ncbifile.hpp.
◆ EIfExistsWhat to do if stream already exists in the AsInputFile/AsOutputFile.
Enumerator eIfExists_ThrowYou can make call of AsInputFile/AsOutputFile only once, on each following call throws CFileException exception.
eIfExists_ResetDelete previous stream and return reference to new object.
Invalidate all previously returned references.
eIfExists_ReturnCurrentReturn reference to current stream, create new one if it does not exists yet.
Definition at line 2384 of file ncbifile.hpp.
◆ EMemMapAdviseWhat 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.
Definition at line 2480 of file ncbifile.hpp.
◆ EMemMapProtectWhich operations are permitted in memory map file.
Enumerator eMMP_ReadData can be read.
eMMP_WriteData can be written.
eMMP_ReadWriteData can be read and written.
Definition at line 2440 of file ncbifile.hpp.
◆ EMemMapShareWhether to share changes or not.
Enumerator eMMS_SharedChanges are shared.
eMMS_PrivateChanges are private (write do not change file)
Definition at line 2447 of file ncbifile.hpp.
◆ EModeDirectory entry access permissions.
Enumerator fExecuteExecute / List(directory) permission.
fWriteWrite permission.
fReadRead permission.
fDefaultSpecial flag: ignore all other flags, use current default mode.
fDefaultDirUserDefault user permission for a dir.
fDefaultDirGroupDefault group permission for a dir.
fDefaultDirOtherDefault other permission for a dir.
fDefaultUserDefault user permission for a file.
fDefaultGroupDefault group permission for a file.
fDefaultOtherDefault other permission for a file.
Definition at line 1151 of file ncbifile.hpp.
◆ EModeRelativeRelative permissions change modes.
Can be combined with TMode or TSpecialModeBits. Only one of these flags is allowed for each mode.
Enumerator fModeAddAdds the argument permission mode to the entry's current mode.
fModeRemoveRemoves the argument permission mode from the entry's current mode.
fModeNoChangeDo not change permission mode.
Definition at line 1185 of file ncbifile.hpp.
◆ EModeStringFormatPermission mode string format.
Octal format ("664")
eModeFormat_SymbolicShell symbolic format ("u=rwx,g=rwx,o=rx")
eModeFormat_ListShell list 'ls -l' like format ("rwxrwxrwx")
eModeFormat_DefaultDefault mode.
Definition at line 1353 of file ncbifile.hpp.
◆ EOpenMode [1/2]Memory file open mode.
Enumerator eCreateCreate new file or rewrite existent with zeros.
eOpenOpen existent file, throw exception otherwise.
eExtendExtend file size with zeros if it exist, throw exception otherwise.
eDefaultDefault open mode.
Definition at line 2453 of file ncbifile.hpp.
◆ EOpenMode [2/2]File open mode.
Enumerator eCreateCreate a new file, or truncate an existing one.
Create a new file, or fail if the file already exists.
eCreateNewOpen an existing file, or fail if the file does not exist.
eOpenOpen an existing file, or create a new one.
eOpenAlways eTruncateOpen an existing file and truncate its size to 0.
Fail if the file does not exist.
Definition at line 3429 of file ncbifile.hpp.
◆ EPositionMoveMethodWhich starting point to use for the moves of the file pointer.
Enumerator eBeginAbsolute position from beginning of the file.
eCurrentRelative to current position.
eEndThe starting point is the current EOF position.
Definition at line 3470 of file ncbifile.hpp.
◆ EProcessingFlagsEntries processing flags.
Current entry only.
fDir_SelfTop directory entry.
fDir_FilesNon-directory entries.
fDir_SubdirsSubdirectory entries (non recursive)
fDir_RecursiveAdd a recursion.
fDir_AllMask to check what should be processed in a directory.
fIgnoreMissingIgnore missed entries.
fProcessAllProcess all entries.
eOnlyEmptyDirectory entry only, no other files or subdirectories.
eEntryOnly eTopDirOnlyAll files in the top directory only, no subdirectories and any files in them.
eNonRecursiveAll files and subdirectories in the top directory, but no files in subdirectories.
eRecursiveProcess all files and subdirectories recursively.
Stop processing on a first error.
eRecursiveStopOnErrors eRecursiveIgnoreMissingSame 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).
eRecursiveNotStopOnErrorsSame 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.
◆ ERelativeToWhatHow to interpret relative paths.
Relative to the current working directory.
eRelativeToExeRelative 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.
◆ ERemoveModeWhat to do with the file on object destruction.
Enumerator eRemoveRemove file.
eNoRemoveDo not remove file.
Definition at line 2365 of file ncbifile.hpp.
◆ ERenameFlagsRename flags.
Enumerator fRF_OverwriteRemove destination if it exists.
fRF_UpdateUpdate older entries only (compare modification times).
fRF_BackupBackup destination if it exists before renaming.
fRF_EqualTypesIf destination entry exists, it must have the same type as source.
fRF_FollowLinksRename entries following sym.links, not the links themselves.
fRF_DefaultDefault flags.
Definition at line 610 of file ncbifile.hpp.
◆ EShareModeSharing mode for opened file.
Enables subsequent open operations on the file that request read access.
Otherwise, other processes cannot open the file for reading.
eShareWriteEnables subsequent open operations on the file that request write access.
Otherwise, other processes cannot open the file for writing.
eShareCombines both eShareRead and eShareWrite modes.
eExclusiveOpen file for exclusive access.
Disables any subsequent open operations on the file.
Definition at line 3455 of file ncbifile.hpp.
◆ ESortSorting mode.
Enumerator ePathSort by full path (default)
eDirDirectory name.
eNameFull file name.
eBaseBase file name.
eExtFile extension.
Definition at line 3395 of file ncbifile.hpp.
◆ ESpecialModeBits Enumerator fSticky fSetGID fSetUIDDefinition at line 1175 of file ncbifile.hpp.
◆ ETextBinaryWhat type of temporary file to create.
Enumerator eTextCreate text file.
eBinaryCreate binary file.
Definition at line 1475 of file ncbifile.hpp.
◆ ETmpFileCreationModeTemporary file creation mode.
Enumerator eTmpFileCreateCreate empty file for each GetTmpName* call.
eTmpFileGetNameGet name of the file only.
Definition at line 1414 of file ncbifile.hpp.
◆ EType [1/2]Directory entry type.
Enumerator eFileRegular file.
eDirDirectory.
ePipePipe.
eLinkSymbolic link (UNIX only)
eSymLinkSymbolic link (UNIX only)
eSocketSocket (UNIX only)
eDoorDoor (UNIX only)
eBlockSpecialBlock special (UNIX only)
eCharSpecialCharacter special.
eUnknownUnknown 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.
◆ EWhoWhich 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 eUserUser mode.
eGroupGroup mode.
eOtherOther mode.
eSpecialSpecial 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.
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 ) constCheck access rights.
Use effective user ID (or process owner) to check the entry for accessibility accordingly to specified mask.
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".
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".
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 virtualCheck 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 inlinevirtualCheck existence of file.
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 inlinevirtualCheck if directory "dirname" exists.
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.
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 inlineGet 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.
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".
Definition at line 3949 of file ncbifile.cpp.
References flags.
◆ GetEntries() [3/6] ◆ GetEntries() [4/6]Get directory entries based on the specified "mask".
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".
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().
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().
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.
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 ) constGet length 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.
Definition at line 5320 of file ncbifile.cpp.
References fFSI_All, info, and s_GetFileSystemInfo().
◆ GetFreeDiskSpace() ◆ GetHome() ◆ GetLength() Int8 CFile::GetLength ( void ) constGet size of file.
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 inlineGet 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.
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.
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 ) staticGet 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 inlineGet pointer to beginning of data.
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.
Definition at line 4239 of file ncbifile.hpp.
References CMemoryFileSegment::m_OffsetReal.
◆ GetRealPtr() void * CMemoryFileSegment::GetRealPtr ( void ) const inlineGet 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.
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 inlineGet length of the mapped region.
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 ( CTime * modification, CTime * last_access =0
, CTime * creation = 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 ) constGet an entry name that a link points to.
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.
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.
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.
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.
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 ) inlinestaticAdvise on memory map usage for specified region.
Definition at line 4197 of file ncbifile.hpp.
References len, and MemoryAdvise().
Referenced by CMemoryFileSegment::MemMapAdvise().
◆ ModeFromModeT()Convert mode_t to permission mode(s).
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.
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.
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 ) virtualVia 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 ) virtualVia 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 ) constRead 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.
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.
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.
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.
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 ) staticSpecify 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
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.
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.
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 ) staticEnable 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
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 ) staticEnable 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
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.
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.
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.
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.
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).
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.
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.
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.
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().
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).
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.
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 ) constWrite file.
Always write all 'count' bytes of data to the file.
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").
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 ) protectedCreate 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 ) protectedExtend 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 ) protectedOpen 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_maxMaximum filename length (part between slashes)
Definition at line 2227 of file ncbifile.hpp.
◆ free_space Uint8 CFileUtil::SFileSystemInfo::free_space ◆ fs_type ◆ kInvalidHandleDefinition 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 protectedDefinition 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 ◆ origOriginal 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 ◆ CMemoryFileRetroSearch 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