Library of Assembled Shared Sources
|
group of functions to test file attributes
Functions | |
bool | lass::io::fileDoesExist (const std::string &fileName) |
return true if file exists | |
std::string | lass::io::fileExtension (const std::string &fileName) |
return the part of the file name behind the last dot. | |
std::string | lass::io::fileWithoutExtension (const std::string &fileName) |
return the part of the file name before the last dot. | |
std::string | lass::io::filePath (const std::string &fileName) |
return the part of the file name before the last (back)slash. | |
std::string | lass::io::fileWithoutPath (const std::string &fileName) |
return the part of the file name behind the last (back)slash. | |
LASS_DLL std::string LASS_CALL lass::io::fileExtension | ( | const std::string & | fileName | ) |
return the part of the file name behind the last dot.
return an empty string if there's no dot. e.g. foo returns an empty string, foo.bar returns bar, foo.bar.fun returns fun.
Definition at line 121 of file file_attribute.cpp.
Referenced by lass::io::Image::open(), and lass::io::Image::save().
LASS_DLL std::string LASS_CALL lass::io::fileWithoutExtension | ( | const std::string & | fileName | ) |
return the part of the file name before the last dot.
return an original string if there's no dot. e.g. foo returns foo, foo.bar returns foo, foo.bar.fun returns foo.bar .
Definition at line 151 of file file_attribute.cpp.
LASS_DLL std::string LASS_CALL lass::io::filePath | ( | const std::string & | fileName | ) |
return the part of the file name before the last (back)slash.
return an empty string if there's no (back)slash. e.g. foo returns an empty string, foo/bar returns foo, foo/bar/fun returns foo/bar.
Definition at line 179 of file file_attribute.cpp.
LASS_DLL std::string LASS_CALL lass::io::fileWithoutPath | ( | const std::string & | fileName | ) |
return the part of the file name behind the last (back)slash.
return the original string if there's no (back)slash. e.g. foo returns foo, foo/bar returns bar, foo/bar/fun returns fun .
Definition at line 211 of file file_attribute.cpp.