Functions | |
| int | SPI_FIL_open_filcat (const std::string &dir, const std::string &pattern) |
| Creates the catalog of files contained in a directory and who respond to the desired mask. | |
| int | SPI_FIL_get_filcat (std::string &fileName) |
| Returns the current file of a catalog. | |
| int | SPI_FIL_get_size_filcat (double *fSize) |
| Returns the size of the current file. | |
| int | SPI_FIL_close_filcat () |
| Closes file catalog. | |
| int | SPI_FIL_complet_name (const std::string &dirName, const std::string &fileName, std::string &fullName) |
| Rebuilds a full file name from its name and directory. | |
| int | SPI_FIL_delete_file (const std::string &dirName, const std::string &fileName) |
| Deletes a file. | |
| int | SPI_FIL_select_file (int mode, const std::string &ext, int flagMosaic, std::string &dir, std::string &name) |
| Calls file browser to select a file. | |
| int | SPI_FIL_test_file (const std::string &dirName, const std::string &fileName, int mode) |
| Checks the presence and attributes of a file or directory. | |
| int | SPI_FIL_copy_file (const std::string &dirIn, const std::string &filIn, const std::string &dirOut, const std::string &filOut) |
| Copies a file. | |
| int | SPI_FIL_get_date_filcat (std::string &fDate) |
| Returns the date of the current file. | |
| int | SPI_FIL_open_dircat (const std::string &dir, int mode) |
| Builds a catalog of sub directories from a directory. | |
| int | SPI_FIL_get_first_dircat (std::string &dir) |
| Returns the first directory of the catalog. | |
| int | SPI_FIL_get_dircat (std::string &dir) |
| Returns the first sub directory of the catalog. | |
| int | SPI_FIL_close_dircat () |
| Closes the catalog of the directory. | |
| int | SPI_FIL_base_name (const std::string &fullName, std::string &dirName, std::string &fileName) |
| Splits a full name to a directory and file name. | |
| int | SPI_FIL_new_extension (const std::string &fileIn, const std::string &ext, std::string &fileOut) |
| Changes the file extension. | |
| int | SPI_FIL_remove_extension (const std::string &fileIn, std::string &fileOut) |
| Removes the file extension. | |
| int | SPI_FIL_remove_tool_extension (const std::string &fileIn, std::string &fileOut) |
| Removes the tool file extension (if filename is with a tool extension) | |
| int | SPI_FIL_CompressDirToZip (const std::string &dirName, const std::string &zipFile) |
| Create a zip file with all files in a directory. | |
| int | SPI_FIL_create_dir (const std::string &dirName) |
| Creates a directory. | |
| int | SPI_FIL_delete_dir (const std::string &dirName) |
| Deletes a directory. | |
| int | SPI_FIL_select_directory (std::string &folder) |
| Calls file browser to select a directory. | |
| int | SPI_FIL_get_extension (const std::string &fileName, std::string &ext) |
| Returns supposed file extension. | |
| int | SPI_FIL_encrypt_file (const std::string &key, const std::string &dirName, const std::string &fileName) |
| Encrypts the file. | |
| int | SPI_FIL_decrypt_file (const std::string &key, const std::string &dirName, const std::string &fileName) |
| Decrypts the file. | |
Miscellaneous utilities for files/directories management
| int SPI_FIL_base_name | ( | const std::string & | fullName, |
| std::string & | dirName, | ||
| std::string & | fileName ) |
Splits a full name to a directory and file name.
| [in] | fullName | full name of the file |
| [out] | dirName | name of the directory |
| [out] | fileName | name of the file |
| int SPI_FIL_close_dircat | ( | ) |
Closes the catalog of the directory.
| int SPI_FIL_close_filcat | ( | ) |
Closes file catalog.
| int SPI_FIL_complet_name | ( | const std::string & | dirName, |
| const std::string & | fileName, | ||
| std::string & | fullName ) |
Rebuilds a full file name from its name and directory.
| [in] | dirName | name of the directory |
| [in] | fileName | name of the file |
| [out] | fullName | full path name of the file |
| int SPI_FIL_CompressDirToZip | ( | const std::string & | dirName, |
| const std::string & | zipFile ) |
Create a zip file with all files in a directory.
| [in] | dirName | Name of the files directory |
| [in] | zipFile | complete Name of the zip file |
| int SPI_FIL_copy_file | ( | const std::string & | dirIn, |
| const std::string & | filIn, | ||
| const std::string & | dirOut, | ||
| const std::string & | filOut ) |
Copies a file.
| [in] | dirIn | name of the input directory |
| [in] | filIn | name of the input file |
| [in] | dirOut | name of the output directory |
| [in] | filOut | name of the output file |
| int SPI_FIL_create_dir | ( | const std::string & | dirName | ) |
Creates a directory.
| [in] | dirName | Name of the directory |
| int SPI_FIL_decrypt_file | ( | const std::string & | key, |
| const std::string & | dirName, | ||
| const std::string & | fileName ) |
Decrypts the file.
| [in] | key | key to decrypt the file |
| [in] | dirName | name of the directory |
| [in] | fileName | name of the file |
| int SPI_FIL_delete_dir | ( | const std::string & | dirName | ) |
Deletes a directory.
| [in] | dirName | Name of the directory |
| int SPI_FIL_delete_file | ( | const std::string & | dirName, |
| const std::string & | fileName ) |
Deletes a file.
| [in] | dirName | name of the directory |
| [in] | fileName | name of the file |
| int SPI_FIL_encrypt_file | ( | const std::string & | key, |
| const std::string & | dirName, | ||
| const std::string & | fileName ) |
Encrypts the file.
| [in] | key | key to encrypte the file |
| [in] | dirName | name of the directory |
| [in] | fileName | name of the file |
| int SPI_FIL_get_date_filcat | ( | std::string & | fDate | ) |
Returns the date of the current file.
| [out] | fDate | date of file (format:jj/mm/aa hh:mn) |
| int SPI_FIL_get_dircat | ( | std::string & | dir | ) |
Returns the first sub directory of the catalog.
| [out] | dir | name of the directory If dir equal nul => end of catalog |
| int SPI_FIL_get_extension | ( | const std::string & | fileName, |
| std::string & | ext ) |
Returns supposed file extension.
| [in] | fileName | file name |
| [out] | ext | supposed file extension |
| int SPI_FIL_get_filcat | ( | std::string & | fileName | ) |
Returns the current file of a catalog.
| [out] | fileName | Current file name If filename equal nul => End of catalog list |
| int SPI_FIL_get_first_dircat | ( | std::string & | dir | ) |
Returns the first directory of the catalog.
| [out] | dir | name of the directory If dir equal nul => end of catalog |
| int SPI_FIL_get_size_filcat | ( | double * | fSize | ) |
Returns the size of the current file.
| [out] | fSize | size of the file |
| int SPI_FIL_new_extension | ( | const std::string & | fileIn, |
| const std::string & | ext, | ||
| std::string & | fileOut ) |
Changes the file extension.
| [in] | fileIn | Input file |
| [in] | ext | new extension of the file |
| [out] | fileOut | Output file with a new extension |
| int SPI_FIL_open_dircat | ( | const std::string & | dir, |
| int | mode ) |
Builds a catalog of sub directories from a directory.
| [in] | dir | name of the directory |
| [in] | mode |
|
| int SPI_FIL_open_filcat | ( | const std::string & | dir, |
| const std::string & | pattern ) |
Creates the catalog of files contained in a directory
and who respond to the desired mask.
| [in] | dir | directory of the files |
| [in] | pattern | filter to select a type of file (default = *.*) Example '*.PCE' |
| int SPI_FIL_remove_extension | ( | const std::string & | fileIn, |
| std::string & | fileOut ) |
Removes the file extension.
| [in] | fileIn | Input file |
| [out] | fileOut | Output file |
| int SPI_FIL_remove_tool_extension | ( | const std::string & | fileIn, |
| std::string & | fileOut ) |
Removes the tool file extension (if filename is with a tool extension)
| [in] | fileIn | Input file |
| [out] | fileOut | Output file |
| int SPI_FIL_select_directory | ( | std::string & | folder | ) |
Calls file browser to select a directory.
| [in,out] | folder | name of the directory |
| int SPI_FIL_select_file | ( | int | mode, |
| const std::string & | ext, | ||
| int | flagMosaic, | ||
| std::string & | dir, | ||
| std::string & | name ) |
Calls file browser to select a file.
| [in] | mode | Option to select a file
|
| [in] | ext | File extension |
| [in] | flagMosaic | draw the picture (SPI_YES,SPI_NO) |
| [in,out] | dir | name of the directory |
| [in,out] | name | name of the file |
| int SPI_FIL_test_file | ( | const std::string & | dirName, |
| const std::string & | fileName, | ||
| int | mode ) |
Checks the presence and attributes of a file or directory.
| [in] | dirName | name of the directory |
| [in] | fileName | name of the file |
| [in] | mode |
|