nux-0.9.48

nux::NFileManagerGeneric Class Reference

#include <NuxCore/FileManager/NFileManagerGeneric.h>

Inheritance diagram for nux::NFileManagerGeneric:
nux::NFileManager nux::NFileManagerGNU

Public Member Functions

int Copy (const TCHAR *InDestFile, const TCHAR *InSrcFile, bool OverWriteExisting, bool OverWriteReadOnly, NFileTransferMonitor *Monitor)
bool MakeDirectory (const TCHAR *Path, bool CreateCompletePath=false)
bool DeleteDirectory (const TCHAR *Path, bool DeleteContentFirst=false)
 Delete directory.
bool Move (const TCHAR *Dest, const TCHAR *Src, bool OverWriteExisting=true, bool OverWriteReadOnly=false, NFileTransferMonitor *Monitor=NULL)
int CreateUniqueFileName (const TCHAR *Filename, const TCHAR *Extension, NString &OutputFilename, unsigned int BaseIndex=0xffffffff)
bool IsDrive (const TCHAR *Path)

Member Function Documentation

int nux::NFileManagerGeneric::Copy ( const TCHAR InDestFile,
const TCHAR InSrcFile,
bool  OverWriteExisting,
bool  OverWriteReadOnly,
NFileTransferMonitor Monitor 
) [virtual]

Implements nux::NFileManager.

Reimplemented in nux::NFileManagerGNU.

int nux::NFileManagerGeneric::CreateUniqueFileName ( const TCHAR Filename,
const TCHAR Extension,
NString OutputFilename,
unsigned int  BaseIndex = 0xffffffff 
) [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);

Parameters:
FilenameFilename with optional path.
ExtensionExtension.
OutputFilenameNew filename.
BaseIndexBase for index search.
Returns:
Index of the new file. -1 if the file couldn't be created The index has to be in the range [0, 9999].

Implements nux::NFileManager.

bool nux::NFileManagerGeneric::DeleteDirectory ( const TCHAR Path,
bool  DeleteContentFirst = false 
) [virtual]

Delete directory.

Delete a Directory. If DeleteContent is true, The content of the directory is deleted before the directory itself;

Parameters:
PathPath of the directory
DeleteContentFirstDelete the content of the directory before deleting the directory itself.
Returns:
TRUE if the directory was deleted.

Implements nux::NFileManager.

Reimplemented in nux::NFileManagerGNU.

bool nux::NFileManagerGeneric::IsDrive ( const TCHAR Path)
bool nux::NFileManagerGeneric::MakeDirectory ( const TCHAR Path,
bool  CreateCompletePath = false 
) [virtual]

Implements nux::NFileManager.

Reimplemented in nux::NFileManagerGNU.

bool nux::NFileManagerGeneric::Move ( const TCHAR Dest,
const TCHAR Src,
bool  OverWriteExisting = true,
bool  OverWriteReadOnly = false,
NFileTransferMonitor Monitor = NULL 
) [virtual]

Implements nux::NFileManager.

Reimplemented in nux::NFileManagerGNU.


The documentation for this class was generated from the following file: