#include <c4d_filename.h>
Private Member Functions | |
Bool | GetMemoryMode () const |
UInt16 | GetSeparator () const |
Private Attributes | |
String | t_name |
MemoryFileStruct * | t_memblock |
MemoryFileStruct | t_readmfs |
Friends | |
class | BaseFile |
Constructors/Destructors | |
Filename () | |
Filename (const Char *string) | |
Filename (const String &string) | |
Filename (const Filename &fn) | |
~Filename () | |
String Content | |
Bool | IsPopulated () const |
const String | GetString () const |
void | SetString (const String &str) |
Bool | IsBrowserUrl () const |
Read/Write Memory | |
void | SetMemoryReadMode (void *adr, Int size) |
void | SetMemoryWriteMode (MemoryFileStruct &mfs) |
Directory/File Parts | |
const Filename | GetDirectory () const |
const Filename | GetFile () const |
void | SetDirectory (const Filename &str) |
void | SetFile (const Filename &str) |
const String | GetFileString () const |
Suffix Part | |
String | GetSuffix () const |
void | SetSuffix (const String &str) |
void | ClearSuffix () |
void | ClearSuffixComplete () |
Bool | CheckSuffix (const String &str) const |
Operators | |
const friend Filename | operator+ (const Filename &fname1, const Filename &fname2) |
const Filename & | operator= (const Filename &fname) |
const Filename & | operator+= (const Filename &fname) |
Bool | operator== (const Filename &fname) const |
Bool | operator!= (const Filename &fname) const |
Manages file and path names.
Filename | ( | ) |
Default constructor.
Creates the filename from a character array.
[in] | string | The filename character array. |
Creates the filename from a string.
[in] | string | The filename string. |
Copy constructor. Creates a filename from another filename.
[in] | fn | The source filename. |
~Filename | ( | ) |
Default destructor.
|
private |
Private. Internal.
|
private |
Private. Internal.
Bool IsPopulated | ( | ) | const |
Checks if the filename has been set.
const String GetString | ( | ) | const |
Gets the String of the filename.
void SetString | ( | const String & | str | ) |
Sets the filename to the passed string.
[in] | str | The string to use to set the filename. |
Bool IsBrowserUrl | ( | ) | const |
Checks if the filename is a Content Browser URL.
void SetMemoryReadMode | ( | void * | adr, |
Int | size | ||
) |
Sets the filename to read from a memory block instead of from a file.
[in] | adr | The memory to read from. The caller owns the pointed memory block. |
[in] | size | The size of memory block adr, or -1 if the buffer is "big enough". |
void SetMemoryWriteMode | ( | MemoryFileStruct & | mfs | ) |
Sets the filename to write to a memory block instead of to a file.
[in] | mfs | The memory file to write to. The caller owns the pointed memory file. |
const Filename GetDirectory | ( | ) | const |
Gets the directory that the file is located.
const Filename GetFile | ( | ) | const |
Gets the file part of the filename only, without the path.
void SetDirectory | ( | const Filename & | str | ) |
Sets the directory for the filename. The file part remains unchanged.
[in] | str | The directory to set for the filename. |
void SetFile | ( | const Filename & | str | ) |
Sets the file part for the filename. The directory part remains unchanged.
[in] | str | The file part to set for the filename. |
const String GetFileString | ( | ) | const |
Convenience function to directly get the file part string. Identical to GetFile().GetString()
.
String GetSuffix | ( | ) | const |
Gets the suffix of the filename.
void SetSuffix | ( | const String & | str | ) |
Sets the suffix part of the filename.
[in] | str | A string with the suffix for the file. Only contain the suffix part and no dot (e.g. "TIF"). |
void ClearSuffix | ( | ) |
Clears the suffix part of the filename.
void ClearSuffixComplete | ( | ) |
The same as ClearSuffix() only that it also clears suffixes longer than seven characters.
Checks if the suffix of the filename is the same as its string.
[in] | str | The suffix to check against. |
Assignment operator. Assigns the filename right-operand to the left-operand filename.
[in] | fname | The right-operand filename. |
Concatenates filenames and set the left-hand operand to the result.
[in] | fname | The right-operand filename. |
Checks if filenames are equal.
[in] | fname | The right-operand filename. |
Checks if filenames are different.
[in] | fname | The right-operand filename. |
|
friend |
Concatenates two filenames. It will join directories and files parts.
[in] | fname1 | The left-operand filename. |
[in] | fname2 | The right-operand filename. |
|
private |
Private. Internal.
|
private |
Private. Internal.
|
private |
Private. Internal.