|
nux-0.9.46
|
#include <NuxCore/FileManager/NFileManagerGeneric.h>
Data Structures | |
| struct | FileTimeStamp |
| Timestamp structure. More... | |
Public Member Functions | |
| NFileManager () | |
| virtual | ~NFileManager () |
| 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 |
| nux::NFileManager::NFileManager | ( | ) | [inline] |
| virtual nux::NFileManager::~NFileManager | ( | ) | [inline, virtual] |
| virtual int nux::NFileManager::Copy | ( | const TCHAR * | Dest, |
| const TCHAR * | Src, | ||
| bool | OverWriteExisting = true, |
||
| bool | OverWriteReadOnly = false, |
||
| NFileTransferMonitor * | Progress = NULL |
||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGeneric, and nux::NFileManagerGNU.
| virtual NSerializer* nux::NFileManager::CreateFileReader | ( | const TCHAR * | Filename, |
| DWORD | ReadFlags = 0, |
||
| LogOutputDevice & | Error = GNullDevice |
||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual NSerializer* nux::NFileManager::CreateFileWriter | ( | const TCHAR * | Filename, |
| DWORD | WriteFlags = 0, |
||
| LogOutputDevice & | Error = GNullDevice |
||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| 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::Delete | ( | const TCHAR * | Filename, |
| bool | OverWriteReadOnly = false |
||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| 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 bool nux::NFileManager::FileExist | ( | const TCHAR * | Filename | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
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.
| virtual void nux::NFileManager::FindFiles | ( | std::vector< NString > & | FileNames, |
| const TCHAR * | Filename, | ||
| bool | Files, | ||
| bool | Directories | ||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual NString nux::NFileManager::GetCurrentDirectory | ( | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual double nux::NFileManager::GetFileAgeSeconds | ( | const TCHAR * | Filename | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual bool nux::NFileManager::GetFileAttribute | ( | const TCHAR * | Filename, |
| bool & | isDirectory, | ||
| bool & | IsReadOnly, | ||
| bool & | IsHidden, | ||
| t_s64 & | Size | ||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual time_t nux::NFileManager::GetFileLastModified | ( | const TCHAR * | Filename | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual bool nux::NFileManager::GetTimeStamp | ( | const TCHAR * | Path, |
| FileTimeStamp & | Timestamp | ||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual void nux::NFileManager::Init | ( | bool | Startup | ) | [inline, virtual] |
| virtual bool nux::NFileManager::IsDirectory | ( | const TCHAR * | DirectoryName | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual bool nux::NFileManager::IsHidden | ( | const TCHAR * | Filename | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual bool nux::NFileManager::IsReadOnly | ( | const TCHAR * | Filename | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual void nux::NFileManager::ListFilesInDirectory | ( | std::vector< NString > & | Result, |
| const TCHAR * | DirName | ||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.
| virtual bool nux::NFileManager::MakeDirectory | ( | const TCHAR * | Path, |
| bool | CreateCompletePath = false |
||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGeneric, and nux::NFileManagerGNU.
| virtual bool nux::NFileManager::Move | ( | const TCHAR * | Dest, |
| const TCHAR * | Src, | ||
| bool | OverWriteExisting = true, |
||
| bool | OverWriteReadOnly = false, |
||
| NFileTransferMonitor * | Monitor = NULL |
||
| ) | [pure virtual] |
Implemented in nux::NFileManagerGeneric, and nux::NFileManagerGNU.
| virtual bool nux::NFileManager::SetDefaultDirectory | ( | ) | [pure virtual] |
Implemented in nux::NFileManagerGNU.