SPH
|
Object generating unique paths. More...
#include <FileManager.h>
Public Member Functions | |
Path | getPath (const Path &expected) |
Generates a unique path, based on given input path. More... | |
![]() | |
Noncopyable ()=default | |
Noncopyable (const Noncopyable &)=delete | |
Noncopyable (Noncopyable &&)=default | |
Noncopyable & | operator= (const Noncopyable &)=delete |
Noncopyable & | operator= (Noncopyable &&)=default |
Object generating unique paths.
Unique paths are generated by appending _001, _002, etc. to the file name. In case more than 999 unique paths are requested from given path, it throws an exception.
Definition at line 13 of file FileManager.h.
Generates a unique path, based on given input path.
The generated file may or may not exist on filesystem, the function only ensures it returns a different path every time. If more multiple manager objects are used, they may generate equal paths. The function is NOT thread safe, it has to be explicitly synchronized.
Definition at line 15 of file FileManager.cpp.