<FilePath> Data Interface

Provides script language access to C++ objects of this type.

Class HierarchyType » FilePath

Function Members

Function members are as follows:

Return Type Function Name Documentation
<FilePath>FilePathThis constructor allows you to initialize the file path. For example: auto FilePath a_oMyPath = new FilePath( "c:\\MyDirectory\\MyFile.txt" ).
int32AddEndSeparatorAppends a trailing backslash \ to the <FilePath> object's current value.
int32AppendPathAppends the path with another path component or filename For example: you can append C:\MyDirectory with "MyPath" and get C:\MyDirectory\MyPath.
int32AppendPathWithFileAppends a file path such as 'C:\MyDirectory' with a filename such as 'myFile.box', producing 'C:\myDirectory\myFile.box'.
int32CanonicalizeThis converts the path to its canonical form. For example: C:\MyDirectory\MyFolder becomes C:\mydirectory\myfolder\.
int32ClearClears the file path value and deallocates its memory. Does not destroy the <FilePath> object.
int32CompareStringCompares the file path of this <FilePath> object with the file path of the <FilePath> object submitted to this function.
int32DirectoryExistsReturns true if the path such as 'C:\MyPath' exists on disk. Otherwise returns false.
int32FileExistsReturns true if the file or directory represented by the <FilePath> exists.
int32FindFilesSearches the directory indicated by the file path value for files and populates a <StrList> with files that match the file type indicated during the search.
stringGetFileExtensionReturns a string containing the file extension component of the path.
stringGetFileNameReturns a string containing the filename component of the path.
stringGetFileNameNoExtensionReturns a string containing the filename component of the path without the file extension.
stringGetFilePathReturns a string containing the filepath component of the path.
stringGetPathReturns a string containing the entire filepath.
static stringInvalidCharSetReturns a string containing the set of characters that cannot be used in Windows® file names.
int32IsEmptyReturns true if the <FilePath> object is not currently storing any file path data.
int32IsRelativeReturns true if the file path is relative.
int32LengthReturns the length of the file path in chars.
int32ListFilesPopulates a Strlist with the contents of a directory on disk, including any sub-directories.
int32MakeRelativeToModelConverts the file path to a relative path using the Model's Filename ( which is always an absolute path ) as the frame of reference.
int32MakeRelativeToPathMakes the path relative to another path.
int32RemoveEndSeparatorRemoves the trailing separator from the file path.
int32RemoveFileExtensionRemoves the file extension from the path.
int32RemoveFileNameRemoves the file name from the path.
int32RemoveFilePathRemoves the file path from the file path.
int32RemoveLastRemoves the last path component from the file path. C:\MyDirectory\AnotherDirectory becomes C:\MyDirectory\. This has the same functionality as RemoveLastPathComponent, but with a shorter function name.
int32RemoveLastPathComponentRemoves the last path component from the file path. C:\MyDirectory\AnotherDirectory becomes C:\MyDirectory\
int32ResolveToModelResolves the file path to the current Model's filename.
int32ResolveToPathResolves the file path to the indicated path.
int32SetPathSets the file path to the path contained in the string.
int32SetToDirectoryFileThis option is undocumented at present.
int32SubdirectoryOfReturns an <int32> greater than or equal to zero if the <FilePath> object submitted to this function is a sub-directory of this <FilePath> object. Otherwise returns -1.

Object Members

Object members are as follows:

Type Name Accessor Name Documentation
<Str>StrReturns a pointer to the <FilePath> object's underlying <Str> object. Please note that you can 'corrupt' the <FilePath> object's internal data if you modify the <Str> object carelessly. Use appropriate caution.