mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Add doxygen docs to plFileName
This commit is contained in:
@ -929,7 +929,7 @@ plFileName plFileName::StripFileName() const
|
||||
if (end < 0)
|
||||
return *this;
|
||||
|
||||
return Left(end + 1);
|
||||
return Left(end);
|
||||
}
|
||||
|
||||
plFileName plFileName::StripFileExt() const
|
||||
|
@ -665,29 +665,70 @@ size_t ustrlen(const UniChar *ustr, size_t max = plString::kSizeAuto);
|
||||
# define PATH_SEPARATOR_STR "/"
|
||||
#endif
|
||||
|
||||
/* plFileName - custom extension of plString for manipulating filenames */
|
||||
/** Subclass of plString with specific methods to help deal with common
|
||||
* filename manipulation tasks.
|
||||
*/
|
||||
class plFileName : public plString
|
||||
{
|
||||
public:
|
||||
/** Construct an empty filename. */
|
||||
plFileName() { }
|
||||
|
||||
/** Construct a filename from the UTF-8 character data in \a cstr. */
|
||||
plFileName(const char *cstr) : plString(cstr) { }
|
||||
|
||||
/** Construct a filename from the plString argument \a copy. */
|
||||
plFileName(const plString ©) : plString(copy) { }
|
||||
|
||||
/** Copy constructor. */
|
||||
plFileName(const plFileName ©) : plString(copy) { }
|
||||
|
||||
/** Return the name portion of the path (including extension).
|
||||
* For example:
|
||||
* <pre>plFileName("C:\\Path\\Filename.ext") => "Filename.ext"</pre>
|
||||
*/
|
||||
plString GetFileName() const;
|
||||
|
||||
/** Return the file extension from the filename.
|
||||
* For example:
|
||||
* <pre>plFileName("C:\\Path\\Filename.ext") => "ext"</pre>
|
||||
*/
|
||||
plString GetFileExt() const;
|
||||
|
||||
/** Return the name portion of the path, excluding its extension.
|
||||
* For example:
|
||||
* <pre>plFileName("C:\\Path\\Filename.ext") => "Filename"</pre>
|
||||
*/
|
||||
plString GetFileNameNoExt() const;
|
||||
|
||||
/** Return the path with the filename portion stripped off.
|
||||
* For example:
|
||||
* <pre>plFileName("C:\\Path\\Filename.ext") => "C:\\Path"</pre>
|
||||
*/
|
||||
plFileName StripFileName() const;
|
||||
|
||||
/** Return the filename with the extension stripped off.
|
||||
* For example:
|
||||
* <pre>plFileName("C:\\Path\\Filename.ext") => "C:\\Path\\Filename"</pre>
|
||||
*/
|
||||
plFileName StripFileExt() const;
|
||||
|
||||
/** Join two path components together with the correct path separator.
|
||||
* For example:
|
||||
* <pre>plFileName::Join("C:\\Path", "Filename.ext") => "C:\\Path\\Filename.ext"</pre>
|
||||
*/
|
||||
static plFileName Join(const plFileName &base, const plFileName &path);
|
||||
|
||||
// TODO: Make this more efficient
|
||||
/** Join three path components together with the correct path separator.
|
||||
* \todo Make this more efficient.
|
||||
*/
|
||||
static plFileName Join(const plFileName &base, const plFileName &path,
|
||||
const plFileName& path2)
|
||||
{ return Join(Join(base, path), path2); }
|
||||
|
||||
/** Join four path components together with the correct path separator.
|
||||
* \todo Make this more efficient.
|
||||
*/
|
||||
static plFileName Join(const plFileName &base, const plFileName &path,
|
||||
const plFileName& path2, const plFileName &path3)
|
||||
{ return Join(Join(Join(base, path), path2), path3); }
|
||||
|
Reference in New Issue
Block a user