CFx SDK Documentation
2023 SP0
|
Functions | |
OdAnsiString | OdStringToUtf8 (const OdString &sUnicode) |
OdString | formatPath (const OdString &path) |
OdString | formatDir (const OdString &dir) |
bool | containsDir (const OdString &dir) |
bool | isDir (const OdString &dir) |
OdString | getFileExtension (const OdString &path) |
OdString | getFile (const OdString &path) |
OdString | getDir (const OdString &path) |
int | createFile (const OdString &path, const char *data, unsigned int size) |
int | copyFile (const OdString &existingFileName, const OdString &newFileName) |
int | removeFile (const OdString &path) |
bool | dirExists (const OdString &dir) |
int | createDir (const OdString &dir) |
int | removeEmptyDir (const OdString &dir) |
int | removeDir (const OdString &dir) |
OdStringArray | getFileList (const OdString &dir) |
OdStringArray | getDirList (const OdString &dir) |
uintmax_t | getProcessId () |
OdString | getUniqueDirName () |
OdResult | unzipFile (const OdString &filePath, const OdString &targetDir, bool overwriteTargetDir=true) |
OdResult | zipToFile (const OdString &targetFile, const OdString &filesDir, bool overwriteTargetFile=true) |
Contains declarations related to working with Zip files content.
bool ZipUtils::containsDir | ( | const OdString & | dir | ) |
Checks if string contains path to directory.
dir | [in] A string containing path. |
Copies existing file to new location under specified name.
existingFileName | [in] A string containing path to exsiting file. |
newFileName | [in] A string containing path to new file. |
int ZipUtils::createDir | ( | const OdString & | dir | ) |
Creates empty directory.
dir | [in] A string containing path to new directory. |
int ZipUtils::createFile | ( | const OdString & | path, |
const char * | data, | ||
unsigned int | size | ||
) |
Creates file.
path | [in] A string containing path to file. |
data | [in] A pointer to buffer containing file data. |
size | [in] Length of the buffer containing file data. |
bool ZipUtils::dirExists | ( | const OdString & | dir | ) |
Checks if string is path to existing directory.
dir | [in] A string containing path. |
Formats path to directory to conform current platform.
dir | [in] A string containing path to directory. |
Formats path to file to conform current platform.
path | [in] A string containing path to file. |
Selects directory part of the path.
path | [in] A string containing path to the directory. |
OdStringArray ZipUtils::getDirList | ( | const OdString & | dir | ) |
Creates list of all directories in specified directory.
dir | [in] A string containing path to directory. |
Selects file part of the path.
path | [in] A string containing path to the file. |
Selects file extension part of the path.
path | [in] A string containing path to the file. |
OdStringArray ZipUtils::getFileList | ( | const OdString & | dir | ) |
Creates list of all files in specified directory.
dir | [in] A string containing path to directory. |
uintmax_t ZipUtils::getProcessId | ( | ) |
Returns identifier of current process.
OdString ZipUtils::getUniqueDirName | ( | ) |
Returns unique name for current process and time.
bool ZipUtils::isDir | ( | const OdString & | dir | ) |
Checks if string is path to directory.
dir | [in] A string containing path. |
OdAnsiString ZipUtils::OdStringToUtf8 | ( | const OdString & | sUnicode | ) |
Converts unicode string to UTF-8.
sUnicode | [in] A string in unicode format. |
int ZipUtils::removeDir | ( | const OdString & | dir | ) |
Removes directory.
dir | [in] A string containing path to new directory. |
int ZipUtils::removeEmptyDir | ( | const OdString & | dir | ) |
Removes empty directory.
value | [in] A string containing path to new directory. |
int ZipUtils::removeFile | ( | const OdString & | path | ) |
Removes file.
path | [in] A string containing path to file. |
OdResult ZipUtils::unzipFile | ( | const OdString & | filePath, |
const OdString & | targetDir, | ||
bool | overwriteTargetDir = true |
||
) |
Unzips file to directory.
filePath | [in] A string containing path to the zip file. |
targetDir | [in] A string containing name of the target directory. |
overwriteTargetDir | [in] Return error if false and target directory is not empty; otherwise, overwrite target directory. |
OdResult ZipUtils::zipToFile | ( | const OdString & | targetFile, |
const OdString & | filesDir, | ||
bool | overwriteTargetFile = true |
||
) |
Zips directory to file.
targetFile | [in] A string containing path to the target zip file. |
filesDir | [in] A string containing name of the source directory. |
overwriteTargetFile | [in] Return error if false and target file exists; otherwise, overwrite target file. |