ImFusion SDK 4.3
ExportFolder Class Reference

Classes

struct  IndexedPath
 

Static Public Member Functions

static std::optional< IndexedPathnextFile (const Filesystem::Directory &baseFolder, const std::string &baseName, const std::string &suffix="", const std::string &extension="")
 Produces a non-existing but writable file name in the given baseFolder, of the form baseName-XX-suffix, where XX starts with 01 and counts up.
 
static std::optional< IndexedPathnextFolder (const Filesystem::Directory &baseFolder, const std::string &baseName, const std::string &suffix="")
 Produces a non-existing but writeable folder name in the given baseFolder, of the form baseName-XX-suffix, where XX starts with 01 and counts up.
 
static std::optional< IndexedPathlastFile (const Filesystem::Directory &baseFolder, const std::string &baseName, const std::string &suffix="", const std::string &extension="")
 In baseFolder, searches for the last already existing file name of the form baseName-XX[-suffix], where XX starts with 01 and counts up.
 
static std::optional< IndexedPathlastFolder (const Filesystem::Directory &baseFolder, const std::string &baseName, const std::string &suffix="")
 In baseFolder, searches for the last already existing directory name of the form baseName-XX[-suffix], where XX starts with 01 and counts up.
 

Member Function Documentation

◆ nextFile()

static std::optional< IndexedPath > nextFile ( const Filesystem::Directory & baseFolder,
const std::string & baseName,
const std::string & suffix = "",
const std::string & extension = "" )
static

Produces a non-existing but writable file name in the given baseFolder, of the form baseName-XX-suffix, where XX starts with 01 and counts up.

Only the part without suffix is checked for determining XX, so that there are no two files with different suffix but identical XX.

Returns
a path to the next empty file, and the corresponding index.

◆ nextFolder()

static std::optional< IndexedPath > nextFolder ( const Filesystem::Directory & baseFolder,
const std::string & baseName,
const std::string & suffix = "" )
static

Produces a non-existing but writeable folder name in the given baseFolder, of the form baseName-XX-suffix, where XX starts with 01 and counts up.

Only the part without suffix is checked for determining XX, so that there are no two files with different suffix but identical XX.

Returns
a path to the next empty folder, and the corresponding index.

◆ lastFile()

static std::optional< IndexedPath > lastFile ( const Filesystem::Directory & baseFolder,
const std::string & baseName,
const std::string & suffix = "",
const std::string & extension = "" )
static

In baseFolder, searches for the last already existing file name of the form baseName-XX[-suffix], where XX starts with 01 and counts up.

Only the part without suffix is checked for determining XX, so that there are no two files with different suffix but identical XX. Optionally, a extension can be added so that this method also works with file names.

  • Returns
    a path to the last file, and the corresponding index.

◆ lastFolder()

static std::optional< IndexedPath > lastFolder ( const Filesystem::Directory & baseFolder,
const std::string & baseName,
const std::string & suffix = "" )
static

In baseFolder, searches for the last already existing directory name of the form baseName-XX[-suffix], where XX starts with 01 and counts up.

Only the part without suffix is checked for determining XX, so that there are no two folders with different suffix but identical XX.

  • Returns
    a path to the last folder, and the corresponding index.

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close