ExchangeFileContents
|
Helper with static methods for processing the file system. More...
Classes | |
class | CallBackFileDirFount |
Typedefs | |
typedef void(* | PROCESSING_FILE_MEMBERPTR) (const fs::path &rFullFileName) |
typedef void(* | PROCESSING_DIR_MEMBERPTR) (const fs::path &rFullPathName) |
Functions | |
__tool_export_dll int | storeFile (const std::string &rsStr, const std::string &rsFileName) |
__tool_export_dll int | lockFile (std::ofstream *&prLockFile, const std::string &rsLockFileName) |
__tool_export_dll int | loadFile (std::string &rstr, const std::string &rsFileName) |
__tool_export_dll int | closeInputFile (std::ifstream *&pFileStream) |
__tool_export_dll int | closeInputFile (std::wifstream *&pFileStream) |
__tool_export_dll int | closeOutputFile (std::ofstream *&pFileStream) |
__tool_export_dll int | closeOutputFile (std::wofstream *&pFileStream) |
__tool_export_dll int | dirExist (const std::string &rsCheckPath) |
__tool_export_dll int | dirExist (const std::wstring &rsCheckPath) |
__tool_export_dll std::string | getCurrentWorkingDirAsString () |
__tool_export_dll std::wstring | getCurrentWorkingDirAsWString () |
__tool_export_dll int | fileExist (const std::string &rsFullFileName) |
__tool_export_dll int | fileExist (const std::wstring &rsFullFileName) |
__tool_export_dll int | copyFile (const std::string &rsSourceFileName, const std::string &rsTargetFileName) |
__tool_export_dll int | deleteFile (const std::string &rsFullFileName) |
__tool_export_dll int | deleteFile (const fs::path &rFullFileName) |
__tool_export_dll void | deleteFileForIterateDirectory (const fs::path &rFullFileName) |
int | _iterateDirectory (const fs::path &rIterPath, bool bRecursive, PROCESSING_FILE_MEMBERPTR ProcessingFileFunction, PROCESSING_DIR_MEMBERPTR ProcessingDirFunction, CallBackFileDirFount *pProcessingObject) |
__tool_export_dll int | iterateDirectory (const fs::path &rIterPath, bool bRecursive, PROCESSING_FILE_MEMBERPTR ProcessingFileFunction, PROCESSING_DIR_MEMBERPTR ProcessingDirFunction) |
__tool_export_dll int | iterateDirectory (const fs::path &rIterPath, bool bRecursive, CallBackFileDirFount &rProcessingObject) |
__tool_export_dll int | storeFile (char *pszData, std::streamsize nSize, const std::string &rsFileName) |
Saves data to a file in the file system. | |
__tool_export_dll int | storeFile (char *pszData, std::streamsize nSize, const std::wstring &rsFileName) |
Saves data to a file in the file system. | |
__tool_export_dll int | storeFile (const Blob *pBlob, const std::string &rsFileName) |
Saves the contents of a blob to a file in the file system. | |
__tool_export_dll int | storeFile (const Blob *pBlob, const std::wstring &rsFileName) |
Saves the contents of a blob to a file in the file system. | |
__tool_export_dll int | storeFile (const Blob &rBlob, const std::string &rsFileName) |
Saves the contents of a blob to a file in the file system. | |
__tool_export_dll int | storeFile (const Blob &rBlob, const std::wstring &rsFileName) |
Saves the contents of a blob to a file in the file system. | |
__tool_export_dll int | loadFile (char *&prszData, std::streamsize &rnSize, const std::string &rsFileName, bool bText=false) |
Returns the content and size of a file from the file system. | |
__tool_export_dll int | loadFile (char *&prszData, std::streamsize &rnSize, const std::wstring &rsFileName, bool bText=false) |
Returns the content and size of a file from the file system. | |
__tool_export_dll int | loadFile (Blob *&prBlob, const std::string &rsFileName) |
__tool_export_dll int | loadFile (Blob *&prBlob, const std::wstring &rsFileName) |
__tool_export_dll int | loadFile (Blob &rBlob, const std::string &rsFileName) |
Returns the contents of a file from the file system. | |
__tool_export_dll int | loadFile (Blob &rBlob, const std::wstring &rsFileName) |
Returns the contents of a file from the file system. | |
__tool_export_dll int | openInputFile (std::ifstream *&pInputFileStream, const std::string &rsFileName) |
Returns an open file of type std::ifstream for writing to the File system. | |
__tool_export_dll int | openInputFile (std::ifstream *&pInputFileStream, const std::wstring &rsFileName) |
Returns an open file of type std::ifstream for writing to the File system. | |
__tool_export_dll int | openInputFile (std::wifstream *&pInputFileStream, const std::string &rsFileName) |
Returns an open file of type std::wifstream for writing to the File system. | |
__tool_export_dll int | openInputFile (std::wifstream *&pInputFileStream, const std::wstring &rsFileName) |
Returns an open file of type std::wifstream for writing to the File system. | |
__tool_export_dll int | openOutputFile (std::ofstream *&pOutputFileStream, const std::string &rsFileName) |
Returns an open file of type std::ofstream for reading in the file system. | |
__tool_export_dll int | openOutputFile (std::ofstream *&pOutputFileStream, const std::wstring &rsFileName) |
Returns an open file of type std::ofstream for reading in the file system. | |
__tool_export_dll int | openOutputFile (std::wofstream *&pOutputFileStream, const std::string &rsFileName) |
Returns an open file of type std::wofstream for reading in the file system. | |
__tool_export_dll int | openOutputFile (std::wofstream *&pOutputFileStream, const std::wstring &rsFileName) |
Returns an open file of type std::wofstream for reading in the file system. | |
__tool_export_dll int | makeDir (const std::string &rsNewPath) |
Creates passed directory(s). | |
__tool_export_dll int | makeDir (const std::wstring &rsNewPath) |
Creates passed directory(s). | |
__tool_export_dll int | makePath (const std::string &rsNewPath) |
Creates passed directory(s). | |
__tool_export_dll int | makePath (const std::wstring &rsNewPath) |
Creates passed directory(s). | |
__tool_export_dll void | splitPath (const std::string &rsFullFileName, std::string &rsDrive, std::string &rsPath, std::string &rsFileName, std::string &rsFileExtension) |
Expects a file name including path (e.g. | |
__tool_export_dll void | splitPath (const std::wstring &rsFullFileName, std::wstring &rsDrive, std::wstring &rsPath, std::wstring &rsFileName, std::wstring &rsFileExtension) |
Expects a file name including path (e.g. | |
__tool_export_dll void | getFullFileName (std::string &rsFullFileName, const fs::path &rFileSystemPath, const char &rSeparator='/') |
Sets the full file name in the passed string from the passed fs::path, even if it is only relative. | |
__tool_export_dll void | getFullFileName (std::wstring &rsFullFileName, const fs::path &rFileSystemPath, const std::wstring &rSeparator=L"/") |
Sets the full file name in the passed string from the passed fs::path, even if it is only relative. | |
int | _getswapDatavalue (std::string &sOutText, const std::string &sInText, const std::string &sTextOrFile) |
Helper function for swapDataInFile (...) which contains a value in a std::string which either comes from a file or as a regular expression or is determined as text. | |
int | _getswapDatavalue (std::string &sOutText, const std::wstring &sInText, const std::string &sTextOrFile) |
Helper function for swapDataInFile (...) which contains a value in a std::string which either comes from a file or as a regular expression or is determined as text. | |
__tool_export_dll int | swapDataInFile (std::vector< std::string > &rParamVector, bool bSimulate=false) |
Searches and replaces contents in files and saves them under a different name if desired. | |
Helper with static methods for processing the file system.
typedef void(* eut::FileHelper::PROCESSING_DIR_MEMBERPTR) (const fs::path &rFullPathName) |
Definitions of the function pointer for FileHelper::iterateDirectory (...), which is called if a path is found during iteration.
[in] | rFullPathName | The complete path in an object of type fs::path. |
typedef void(* eut::FileHelper::PROCESSING_FILE_MEMBERPTR) (const fs::path &rFullFileName) |
Definitions of the function pointer for FileHelper::iterateDirectory (...), which is called when a file is found during iteration.
[in] | rFullFileName | The file name with full path in an object of type fs::path. |
int eut::FileHelper::_getswapDatavalue | ( | std::string & | sOutText, |
const std::string & | sInText, | ||
const std::string & | sTextOrFile ) |
Helper function for swapDataInFile (...) which contains a value in a std::string which either comes from a file or as a regular expression or is determined as text.
[in,out] | sOutText | The determined value. |
[in] | sInText | Der Value after the sTextOrFile value. |
[in] | sTextOrFile | The expression to be evaluated (see description swapDataInFile (...) rParamVector[1] and rParamVector[2]. |
int eut::FileHelper::_getswapDatavalue | ( | std::string & | sOutText, |
const std::wstring & | sInText, | ||
const std::string & | sTextOrFile ) |
Helper function for swapDataInFile (...) which contains a value in a std::string which either comes from a file or as a regular expression or is determined as text.
[in,out] | sOutText | The determined value. |
[in] | sInText | Der Value after the sTextOrFile value. |
[in] | sTextOrFile | The expression to be evaluated (see description swapDataInFile (...) rParamVector[1] and rParamVector[2]. |
int eut::FileHelper::_iterateDirectory | ( | const fs::path & | rIterPath, |
bool | bRecursive, | ||
PROCESSING_FILE_MEMBERPTR | ProcessingFileFunction, | ||
PROCESSING_DIR_MEMBERPTR | ProcessingDirFunction, | ||
CallBackFileDirFount * | pProcessingObject ) |
Contains the functions FileHelper::iterateDirectory( const fs::path & rIterPath, bool bRecursive, PROCESSING_FILE_MEMBERPTR ProcessingFileFunction, PROCESSING_DIR_MEMBERPTR ProcessingDirFunction ) and FileHelper::iterateDirectory( const fs::path & rIterPath, bool bRecursive, CallBackFileDirFount & rProcessingObject ) together or is called by them.
[in] | rIterPath | The path; can also be a relative path through which iteration is performed. |
[in] | bRecursive | If true, the path is also defined by any subdirectories itereiert. |
[in] | ProcessingFileFunction | A pointer to a function that is executed at each is called up in the file found. |
[in] | ProcessingDirFunction | A pointer to a function that is called at each found directory is called. |
[in] | pProcessingObject | Pointer to a derived CallBackFileDirFount object; if not nullptr, its methods are called. |
__tool_export_dll int eut::FileHelper::closeInputFile | ( | std::ifstream *& | pFileStream | ) |
Closes a file of type std::ifstream in the file system.
[in,out] | pFileStream | Pointer reference to an input file stream representing the opened file. |
__tool_export_dll int eut::FileHelper::closeInputFile | ( | std::wifstream *& | pFileStream | ) |
Closes a file of type std::wifstream in the file system.
[in,out] | pFileStream | Pointer reference to an input file stream representing the opened file. |
__tool_export_dll int eut::FileHelper::closeOutputFile | ( | std::ofstream *& | pFileStream | ) |
Closes a file of type std::ofstream in the file system.
[in,out] | pFileStream | Pointer reference to an output file stream representing the opened file. |
__tool_export_dll int eut::FileHelper::closeOutputFile | ( | std::wofstream *& | pFileStream | ) |
Closes a file of type std::wofstream in the file system.
[in,out] | pFileStream | Pointer reference to an output file stream representing the opened file. |
__tool_export_dll int eut::FileHelper::copyFile | ( | const std::string & | rsSourceFileName, |
const std::string & | rsTargetFileName ) |
Copies the transferred file.
[in] | rsSourceFileName | The complete file name (e.g. "c:\\temp\\SourceText.txt") of the file to be copied. |
[in] | rsTargetFileName | The complete file name (e.g. "c:\\temp\\TargetText.txt") of the file to be newly created or overwritten. |
__tool_export_dll int eut::FileHelper::deleteFile | ( | const fs::path & | rFullFileName | ) |
A function that attempts to delete the passed file from the file system.
[in] | rFullFileName | The file name with full path in an object of type fs::path. |
__tool_export_dll int eut::FileHelper::deleteFile | ( | const std::string & | rsFullFileName | ) |
A function that attempts to delete the passed file from the file system.
[in] | rsFullFileName | The file name with full path. |
__tool_export_dll void eut::FileHelper::deleteFileForIterateDirectory | ( | const fs::path & | rFullFileName | ) |
A function that attempts to delete the passed file from the file system.
Nothing will be done or reported if this fails for some reason.
No exception that may occur will be caught and/or processed.
This function can be used as the 3rd parameter for X.
iterateDirectory( const fs::path & rIterPath,
bool bRecursive,
PROCESSING_FILE_MEMBERPTR ProcessingFileFunction,
PROCESSING_DIR_MEMBERPTR ProcessingDirFunction )
[in] | rFullFileName | The file name with full path in an object of type fs::path. |
__tool_export_dll int eut::FileHelper::dirExist | ( | const std::string & | rsCheckPath | ) |
Checks if a directory exists in the file system.
[in] | rsCheckPath | The full name of the directory to check. |
__tool_export_dll int eut::FileHelper::dirExist | ( | const std::wstring & | rsCheckPath | ) |
Checks if a directory exists in the file system.
[in] | rsCheckPath | The full name of the directory to check. |
__tool_export_dll int eut::FileHelper::fileExist | ( | const std::string & | rsFullFileName | ) |
Checks if a file exists in the file system.
[in] | rsFullFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::fileExist | ( | const std::wstring & | rsFullFileName | ) |
Checks if a file exists in the file system.
[in] | rsFullFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll std::string eut::FileHelper::getCurrentWorkingDirAsString | ( | ) |
Returns the current working directory.
__tool_export_dll std::wstring eut::FileHelper::getCurrentWorkingDirAsWString | ( | ) |
Returns the current working directory.
__tool_export_dll void eut::FileHelper::getFullFileName | ( | std::string & | rsFullFileName, |
const fs::path & | rFileSystemPath, | ||
const char & | rSeparator = '/' ) |
Sets the full file name in the passed string from the passed fs::path, even if it is only relative.
[in,out] | rsFullFileName | The determined path. |
[in] | rFileSystemPath | The filesystem path from which the full file name is determined. |
[in] | rSeparator | The path separator. There are only the characters '/' or '\' allowed. For another character, '/' is used without exception taken. |
__tool_export_dll void eut::FileHelper::getFullFileName | ( | std::wstring & | rsFullFileName, |
const fs::path & | rFileSystemPath, | ||
const std::wstring & | rSeparator = L"/" ) |
Sets the full file name in the passed string from the passed fs::path, even if it is only relative.
[in,out] | rsFullFileName | The determined path. |
[in] | rFileSystemPath | The filesystem path from which the full file name is determined. |
[in] | rSeparator | The path separator. There are only the characters '/' or '\' allowed. For another character, '/' is used without exception taken. |
__tool_export_dll int eut::FileHelper::iterateDirectory | ( | const fs::path & | rIterPath, |
bool | bRecursive, | ||
CallBackFileDirFount & | rProcessingObject ) |
It is iterated by the specified path (parameter 'rIterPath') and is used for each file or directory in the transferred CallBackFileDirFount contains the corresponding methods CallBackFileDirFount::processDirFount (...) or CallBackFileDirFount::processFileFount (...) are called.
[in] | rIterPath | The path; can also be a relative path through which iteration is performed. |
[in] | bRecursive | If true, the path is also determined by any subdirectories itereiert. |
[in] | rProcessingObject | Reference to a derived CallBackFileDirFount. |
__tool_export_dll int eut::FileHelper::iterateDirectory | ( | const fs::path & | rIterPath, |
bool | bRecursive, | ||
PROCESSING_FILE_MEMBERPTR | ProcessingFileFunction, | ||
PROCESSING_DIR_MEMBERPTR | ProcessingDirFunction ) |
It is iterated by the specified path (parameter 'rIterPath') and if corresponding function pointers are passed, these are each passed for a Directory or a file is called.
[in] | rIterPath | The path; can also be a relative path through which iteration is performed. |
[in] | bRecursive | If true, the path is also used by any subdirectories itereiert. |
[in] | ProcessingFileFunction | A pointer to a function that is executed at each is called up in the file found. |
[in] | ProcessingDirFunction | A pointer to a function that is called at each found directory is called. |
__tool_export_dll int eut::FileHelper::loadFile | ( | Blob & | rBlob, |
const std::string & | rsFileName ) |
Returns the contents of a file from the file system.
[in,out] | rBlob | Reference to the Blob where the content of the file is inserted. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::loadFile | ( | Blob & | rBlob, |
const std::wstring & | rsFileName ) |
Returns the contents of a file from the file system.
[in,out] | rBlob | Reference to the Blob where the content of the file is inserted. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::loadFile | ( | Blob *& | prBlob, |
const std::string & | rsFileName ) |
Returns the contents of a file from the file system.
[in,out] | prBlob | Pointer reference to a new Blob in which the content of the file is saved. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::loadFile | ( | Blob *& | prBlob, |
const std::wstring & | rsFileName ) |
Returns the contents of a file from the file system.
[in,out] | prBlob | Pointer reference to a new Blob in which the content of the file is saved. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::loadFile | ( | char *& | prszData, |
std::streamsize & | rnSize, | ||
const std::string & | rsFileName, | ||
bool | bText = false ) |
Returns the content and size of a file from the file system.
[in,out] | prszData | Pointer reference to the memory where the content of the file is saved. |
[in,out] | rnSize | Size of the saved file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
[in] | bText | If true, a 0 is appended to the file data in prszData. |
__tool_export_dll int eut::FileHelper::loadFile | ( | char *& | prszData, |
std::streamsize & | rnSize, | ||
const std::wstring & | rsFileName, | ||
bool | bText = false ) |
Returns the content and size of a file from the file system.
[in,out] | prszData | Pointer reference to the memory where the content of the file is saved. |
[in,out] | rnSize | Size of the saved file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
[in] | bText | If true, a 0 is appended to the file data in prszData. |
__tool_export_dll int eut::FileHelper::loadFile | ( | std::string & | rstr, |
const std::string & | rsFileName ) |
Returns the contents of a file from the file system in a std::string.
[in,out] | rstr | The std::string in which the content of the file is. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::lockFile | ( | std::ofstream *& | prLockFile, |
const std::string & | rsLockFileName ) |
Locks a file in the file system.
[in,out] | prLockFile | The locked LockFile. |
[in] | rsLockFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::makeDir | ( | const std::string & | rsNewPath | ) |
Creates passed directory(s).
[in] | rsNewPath | The full directory name. It does not create the full path, only the last directory if the parent directories exist. See also int FileHelper::makePath (...). |
__tool_export_dll int eut::FileHelper::makeDir | ( | const std::wstring & | rsNewPath | ) |
Creates passed directory(s).
[in] | rsNewPath | The full directory name. It does not create the full path, only the last directory if the parent directories exist. See also int FileHelper::makePath (...). |
__tool_export_dll int eut::FileHelper::makePath | ( | const std::string & | rsNewPath | ) |
Creates passed directory(s).
[in] | rsNewPath | The full directory name. All directories will be created, if not already present. |
__tool_export_dll int eut::FileHelper::makePath | ( | const std::wstring & | rsNewPath | ) |
Creates passed directory(s).
[in] | rsNewPath | The full directory name. All directories will be created, if not already present. |
__tool_export_dll int eut::FileHelper::openInputFile | ( | std::ifstream *& | pInputFileStream, |
const std::string & | rsFileName ) |
Returns an open file of type std::ifstream for writing to the File system.
[in,out] | pInputFileStream | Pointer reference to an input file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openInputFile | ( | std::ifstream *& | pInputFileStream, |
const std::wstring & | rsFileName ) |
Returns an open file of type std::ifstream for writing to the File system.
[in,out] | pInputFileStream | Pointer reference to an input file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openInputFile | ( | std::wifstream *& | pInputFileStream, |
const std::string & | rsFileName ) |
Returns an open file of type std::wifstream for writing to the File system.
[in,out] | pInputFileStream | Pointer reference to an input file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openInputFile | ( | std::wifstream *& | pInputFileStream, |
const std::wstring & | rsFileName ) |
Returns an open file of type std::wifstream for writing to the File system.
[in,out] | pInputFileStream | Pointer reference to an input file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openOutputFile | ( | std::ofstream *& | pOutputFileStream, |
const std::string & | rsFileName ) |
Returns an open file of type std::ofstream for reading in the file system.
[in,out] | pOutputFileStream | Pointer reference to an output file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openOutputFile | ( | std::ofstream *& | pOutputFileStream, |
const std::wstring & | rsFileName ) |
Returns an open file of type std::ofstream for reading in the file system.
[in,out] | pOutputFileStream | Pointer reference to an output file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openOutputFile | ( | std::wofstream *& | pOutputFileStream, |
const std::string & | rsFileName ) |
Returns an open file of type std::wofstream for reading in the file system.
[in,out] | pOutputFileStream | Pointer reference to an output file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll int eut::FileHelper::openOutputFile | ( | std::wofstream *& | pOutputFileStream, |
const std::wstring & | rsFileName ) |
Returns an open file of type std::wofstream for reading in the file system.
[in,out] | pOutputFileStream | Pointer reference to an output file stream which represents the open file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt") |
__tool_export_dll void eut::FileHelper::splitPath | ( | const std::string & | rsFullFileName, |
std::string & | rsDrive, | ||
std::string & | rsPath, | ||
std::string & | rsFileName, | ||
std::string & | rsFileExtension ) |
Expects a file name including path (e.g.
"c:/temp/TestText.txt"); returns all path components.
[in] | rsFullFileName | The complete file name of the file name to be split. |
[in,out] | rsDrive | Name of the drive (or the representation of such a drive). |
[in,out] | rsPath | The path. Path separators are supplied as '/'. |
[in,out] | rsFileName | The file name |
[in,out] | rsFileExtension | A file extension, if available |
__tool_export_dll void eut::FileHelper::splitPath | ( | const std::wstring & | rsFullFileName, |
std::wstring & | rsDrive, | ||
std::wstring & | rsPath, | ||
std::wstring & | rsFileName, | ||
std::wstring & | rsFileExtension ) |
Expects a file name including path (e.g.
"c:/temp/TestText.txt"); returns all path components.
[in] | rsFullFileName | The complete file name of the file name to be split. |
[in,out] | rsDrive | Name of the drive (or the representation of such a drive). |
[in,out] | rsPath | The path. Path separators are supplied as '/'. |
[in,out] | rsFileName | The file name |
[in,out] | rsFileExtension | A file extension, if available |
__tool_export_dll int eut::FileHelper::storeFile | ( | char * | pszData, |
std::streamsize | nSize, | ||
const std::string & | rsFileName ) |
Saves data to a file in the file system.
[in] | pszData | Pointer to the memory which is to be stored in a file. |
[in] | nSize | Size of the memory area to be stored. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::storeFile | ( | char * | pszData, |
std::streamsize | nSize, | ||
const std::wstring & | rsFileName ) |
Saves data to a file in the file system.
[in] | pszData | Pointer to the memory which is to be stored in a file. |
[in] | nSize | Size of the memory area to be stored. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::storeFile | ( | const Blob & | rBlob, |
const std::string & | rsFileName ) |
Saves the contents of a blob to a file in the file system.
[in] | rBlob | Reference to an Blob whose content is to be stored in a file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::storeFile | ( | const Blob & | rBlob, |
const std::wstring & | rsFileName ) |
Saves the contents of a blob to a file in the file system.
[in] | rBlob | Reference to an Blob whose content is to be stored in a file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::storeFile | ( | const Blob * | pBlob, |
const std::string & | rsFileName ) |
Saves the contents of a blob to a file in the file system.
[in] | pBlob | Pointer to an Blob whose content is to be stored in a file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::storeFile | ( | const Blob * | pBlob, |
const std::wstring & | rsFileName ) |
Saves the contents of a blob to a file in the file system.
[in] | pBlob | Pointer to an Blob whose content is to be stored in a file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::storeFile | ( | const std::string & | rsStr, |
const std::string & | rsFileName ) |
Saves a string to a file in the file system.
[in] | rsStr | A standard string to be stored in a file. |
[in] | rsFileName | The complete file name (e.g. "c:\\temp\\TestText.txt"). |
__tool_export_dll int eut::FileHelper::swapDataInFile | ( | std::vector< std::string > & | rParamVector, |
bool | bSimulate = false ) |
Searches and replaces contents in files and saves them under a different name if desired.
[in] | rParamVector | A std::vector<std::string> with the parameters. The following parameters are expected:
|
[in] | bSimulate | If true, will not be stored. |