My Project
SallyAPI::File::FileHelper Class Reference

File helper. More...

#include <FileHelper.h>

List of all members.

Static Public Member Functions

static bool FileExists (std::string fileName)
 File exists.
static bool FileExistsAndNotEmpty (const std::string &fileName)
 File exists and not empty.
static std::vector< std::string > ReadFileToVector (const std::string &file, std::vector< std::string > *addToVector=NULL)
 Reads a file to vector.
static bool AddLineToFile (const std::string &filePath, const std::string &line)
 Adds a line to file to 'line'.
static std::string GetFormatedFileSize (const std::string &fileName)
 Gets a formated file size.
static std::string GetFormatedFileCreateDate (const std::string &fileName)
 Gets a formated file create date.
static std::string GetFormatedFileAccessDate (const std::string &fileName)
 Gets a formated file access date.
static std::string GetFormatedFileWriteDate (const std::string &fileName)
 Gets a formated file write date.
static std::map< std::string,
SallyAPI::File::DRIVE_TYPE
GetDriveList ()
 Gets the drive list.
static bool IsDirectory (const std::string &filename)
 Query if 'fileName' is directory.
static std::string FormatFileTime (FILETIME filetime)
 Format file time.
static long CountFilesInFolder (const std::string &sourcePath, long fileCount=0)
 Count files in the given folder.
static bool FileAction (SallyAPI::File::CFileActionController *fileActionController, const std::string &sourcePath, const std::string &destinationPath)
 File action.

Detailed Description

File helper.

Author:
Christian Knobloch
Date:
19.04.2010

Member Function Documentation

bool FileHelper::AddLineToFile ( const std::string &  filePath,
const std::string &  line 
) [static]

Adds a line to file to 'line'.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
filePathFull pathname of the file.
lineThe line.
Returns:
true if it succeeds, false if it fails.
long FileHelper::CountFilesInFolder ( const std::string &  sourcePath,
long  fileCount = 0 
) [static]

Count files in the given folder.

Author:
Christian Knobloch
Date:
22.12.2011
Parameters:
sourcePathFull pathname of the source file.
fileCountNumber of files.
Returns:
The total number of files in folder.
bool FileHelper::FileAction ( SallyAPI::File::CFileActionController fileActionController,
const std::string &  sourcePath,
const std::string &  destinationPath 
) [static]

File action.

Author:
Christian Knobloch
Date:
22.12.2011
Parameters:
[in,out]fileActionControllerThe file action controller.
sourcePathFull pathname of the source file.
destinationPathFull pathname of the destination file.
Returns:
true if it succeeds, false if it fails.
bool FileHelper::FileExists ( std::string  fileName) [static]

File exists.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileNameFilename of the file.
Returns:
true if it succeeds, false if it fails.
bool FileHelper::FileExistsAndNotEmpty ( const std::string &  fileName) [static]

File exists and not empty.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileNameFilename of the file.
Returns:
true if it succeeds, false if it fails.
std::string FileHelper::FormatFileTime ( FILETIME  filetime) [static]

Format file time.

Author:
Christian Knobloch
Date:
25.06.2011
Parameters:
filetimeThe filetime.
Returns:
The formatted file time.
std::map< std::string, SallyAPI::File::DRIVE_TYPE > FileHelper::GetDriveList ( ) [static]

Gets the drive list.

Author:
Christian Knobloch
Date:
16.06.2010
Returns:
The drive list.
std::string FileHelper::GetFormatedFileAccessDate ( const std::string &  fileName) [static]

Gets a formated file access date.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileNameFilename of the file.
Returns:
The formated file access date.
std::string FileHelper::GetFormatedFileCreateDate ( const std::string &  fileName) [static]

Gets a formated file create date.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileNameFilename of the file.
Returns:
The formated file create date.
std::string FileHelper::GetFormatedFileSize ( const std::string &  fileName) [static]

Gets a formated file size.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileNameFilename of the file.
Returns:
The formated file size.
std::string FileHelper::GetFormatedFileWriteDate ( const std::string &  fileName) [static]

Gets a formated file write date.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileNameFilename of the file.
Returns:
The formated file write date.
bool FileHelper::IsDirectory ( const std::string &  fileName) [static]

Query if 'fileName' is directory.

Author:
Christian Knobloch
Date:
25.06.2011
Parameters:
fileNameFilename of the file.
Returns:
true if directory, false if not.
std::vector< std::string > FileHelper::ReadFileToVector ( const std::string &  file,
std::vector< std::string > *  addToVector = NULL 
) [static]

Reads a file to vector.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
fileThe file.
[in,out]addToVectorIf non-null, the add to vector.
Returns:
The file to vector.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines