nux-1.14.0
|
Classes | |
struct | FileTimeStamp |
Timestamp structure. More... | |
Public Member Functions | |
virtual void | Init (bool Startup) |
virtual NSerializer * | CreateFileReader (const TCHAR *Filename, DWORD ReadFlags=0, LogOutputDevice &Error=GNullDevice)=0 |
virtual NSerializer * | CreateFileWriter (const TCHAR *Filename, DWORD WriteFlags=0, LogOutputDevice &Error=GNullDevice)=0 |
virtual t_s64 | FileSize (const TCHAR *Filename)=0 |
Return TRUE if the file exist. | |
virtual bool | FileExist (const TCHAR *Filename)=0 |
virtual int | Copy (const TCHAR *Dest, const TCHAR *Src, bool OverWriteExisting=true, bool OverWriteReadOnly=false, NFileTransferMonitor *Progress=NULL)=0 |
virtual bool | Move (const TCHAR *Dest, const TCHAR *Src, bool OverWriteExisting=true, bool OverWriteReadOnly=false, NFileTransferMonitor *Monitor=NULL)=0 |
virtual bool | Delete (const TCHAR *Filename, bool OverWriteReadOnly=false)=0 |
virtual bool | IsReadOnly (const TCHAR *Filename)=0 |
virtual bool | IsDirectory (const TCHAR *DirectoryName)=0 |
virtual bool | IsHidden (const TCHAR *Filename)=0 |
virtual bool | GetFileAttribute (const TCHAR *Filename, bool &isDirectory, bool &IsReadOnly, bool &IsHidden, t_s64 &Size)=0 |
virtual bool | MakeDirectory (const TCHAR *Path, bool CreateCompletePath=false)=0 |
virtual bool | DeleteDirectory (const TCHAR *Path, bool DeleteContentFirst=false)=0 |
Delete directory. | |
virtual int | CreateUniqueFileName (const TCHAR *Filename, const TCHAR *Extension, NString &OutputFilename, unsigned int BaseIndex=0xffffffff)=0 |
virtual void | FindFiles (std::vector< NString > &FileNames, const TCHAR *Filename, bool Files, bool Directories)=0 |
virtual void | ListFilesInDirectory (std::vector< NString > &Result, const TCHAR *DirName)=0 |
virtual time_t | GetFileLastModified (const TCHAR *Filename)=0 |
virtual double | GetFileAgeSeconds (const TCHAR *Filename)=0 |
virtual bool | SetDefaultDirectory ()=0 |
virtual NString | GetCurrentDirectory ()=0 |
virtual bool | GetTimeStamp (const TCHAR *Path, FileTimeStamp &Timestamp)=0 |
Definition at line 78 of file NFileManagerGeneric.h.
virtual int nux::NFileManager::CreateUniqueFileName | ( | const TCHAR * | Filename, |
const TCHAR * | Extension, | ||
NString & | OutputFilename, | ||
unsigned int | BaseIndex = 0xffffffff |
||
) | [pure virtual] |
Creates a unique file name. The format of the name is "DirectoryPath/BaseName####.Extension" where #### is a 4-digit number in [0, 9999]. The new name is unique and does not exist in the path directory. The function returns the value of the index created for the new file name or -1 if none could be found. The return value can be saved and passed the he next call to CreateUniqueFileName in order to speed up the search. Example usage: Create a new file name for of form DirectoryPath/Filename####.ext CreateUniqueFileName(TEXT("DirectoryPath/Filename"), TEXT("ext"), Output);
Filename | Filename with optional path. |
Extension | Extension. |
OutputFilename | New filename. |
BaseIndex | Base for index search. |
Implemented in nux::NFileManagerGeneric.
virtual bool nux::NFileManager::DeleteDirectory | ( | const TCHAR * | Path, |
bool | DeleteContentFirst = false |
||
) | [pure virtual] |
Delete directory.
Delete a Directory. If DeleteContent is true, The content of the directory is deleted before the directory itself;
Path | Path of the directory |
DeleteContentFirst | Delete the content of the directory before deleting the directory itself. |
Implemented in nux::NFileManagerGeneric, and nux::NFileManagerGNU.
virtual t_s64 nux::NFileManager::FileSize | ( | const TCHAR * | Filename | ) | [pure virtual] |
Return TRUE if the file exist.
Return TRUE if the file exist.
Filename | the full path of the file to search. |
Implemented in nux::NFileManagerGNU.