3ds Max C++ API Reference
Path Class Reference

Path type - adds path-operation richness over symbol strings. More...

#include <Path.h>

+ Inheritance diagram for Path:

Public Member Functions

UtilExport Path ()
 Default constructor - creates an empty path. More...
 
UtilExport Path (const MSTR &pathString)
 Construct a path from a path-filename string. More...
 
UtilExport Path (const MCHAR *pathString)
 Construct from a null-terminated path-filename MCHAR array. More...
 
UtilExport Path (const Path &other)
 Copy construct a Path from another. More...
 
UtilExport ~Path ()
 Destructor. More...
 
UtilExport PathSetPath (const Path &other)
 Set this Path from another. More...
 
UtilExport PathSetPath (const MCHAR *pathString)
 Set this Path's internal string from a null terminated character string. More...
 
UtilExport PathSetPath (const MSTR &pathString)
 Set this Path from a MSTR. More...
 
UtilExport Pathoperator= (const Path &other)
 Assignment operator. More...
 
UtilExport Pathoperator= (const MCHAR *pathString)
 Assignment operator taking a null terminated character string. More...
 
UtilExport Pathoperator= (const MSTR &pathString)
 Assignment operator. More...
 
UtilExport bool IsAbsolute () const
 Get whether this is an absolutely specified path. More...
 
UtilExport bool IsEmpty () const
 Get whether this is an empty path. More...
 
UtilExport bool IsLegal () const
 Query whether this path doesn't have any illegal characters according to the Windows platform rules. More...
 
UtilExport bool IsRoot () const
 Check if this path is just a root. More...
 
UtilExport bool IsUnc () const
 Query whether this path is a UNC path. More...
 
UtilExport bool IsUncShare () const
 Query whether this path fits the pattern for a UNC share. More...
 
UtilExport bool IsRootedAtBackslash () const
 Query whether this path is rooted at backslash, that is at the current drive with no drive letter. More...
 
UtilExport bool IsRootedAtDriveLetter () const
 Query whether this path is rooted at a drive letter. More...
 
UtilExport bool HasUnresolvedSymbols () const
 Query whether unresolved symbols remain in this string. More...
 
UtilExport bool StartsWithUpDirectory () const
 Query with this path, when normalized, starts with "..". More...
 
UtilExport bool IsEqual (const Path &other) const
 Query whether this and the passed-in path are exactly the same. More...
 
UtilExport bool operator== (const Path &other) const
 Query whether this and the passed-in path are exactly the same. More...
 
UtilExport bool ResolvesEquivalent (const Path &other) const
 Query whether this and the passed-in path currently point to the same location. More...
 
UtilExport bool HasTrailingBackslash () const
 Query whether this path has a trailing backslash. More...
 
UtilExport PathAddTrailingBackslash ()
 Add a backslash to the end of this path if there isn't one already. More...
 
UtilExport PathRemoveTrailingBackslash ()
 Remove any trailing backslash from this path. More...
 
UtilExport PathPrepend (const Path &newParent)
 Add a new parent path to the start of this path. More...
 
UtilExport PathAppend (const Path &relativeChild)
 Add a new child path at the end of this path. More...
 
UtilExport PathStripToTopParent ()
 Strip all but the topmost parent from this path. More...
 
UtilExport PathRemoveTopParent ()
 Remove the topmost parent from this path. More...
 
UtilExport PathStripToLeaf ()
 Strip all but the very last child from this path. More...
 
UtilExport PathRemoveLeaf ()
 Remove the very last child from this path. More...
 
UtilExport PathResolveSymbols ()
 Resolve out any symbols in the path string. More...
 
UtilExport PathNormalize ()
 Transform this path into its normal form. More...
 
UtilExport PathConvertToLowerCase ()
 Convert all the characters in this path to lower case. More...
 
UtilExport PathConvertToRelativeTo (const Path &newBase)
 Convert this absolute Path so that it points to the same location, but relative to the new base path. More...
 
UtilExport PathConvertToUNC ()
 Convert this mapped drive Path to a UNC path with a host and share name. More...
 
UtilExport PathConvertToAbsolute ()
 Convert this relative path to absolute rooted at the current 3ds Max Project Folder. More...
 
UtilExport const PathGetResolvedAbsolutePath () const
 Get the fully-resolved, lower case, path converted to absolute rooted at the current 3ds Max Project Folder. More...
 
UtilExport PathConvertToRelativeToProjectFolder ()
 Converts an absolute path into a path that is relative to the current Project Folder. More...
 
UtilExport bool Exists ()
 Queries whether the file or directory exists. More...
 
UtilExport bool IsRootedToFolder (const Path &folder) const
 Queries whether the file or directory is rooted to the specified folder. More...
 
UtilExport MSTR GetString () const
 Get the current string representation of this path. More...
 
UtilExport const MCHARGetCStr () const
 Get the internal c-string formatted data representation for this path. More...
 
UtilExport bool SaveBaseFile () const
 Creates base file to support incremental upload of Autodesk 360 files if applicable. More...
 
PathImpl & GetImpl ()
 Not exported outside the DLL - for use by PathImpl only. More...
 
const PathImpl & GetImpl () const
 Not exported outside the DLL - for use by PathImpl only. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

Path type - adds path-operation richness over symbol strings.

The Path interface provides operations for path composition (Path::Append and Path::Prepend ) and decomposition (Path::StripToTopParent, Path::StripToLeaf, Path::RemoveTopParent, Path::RemoveLeaf), query methods for determining information about a Path, such as whether it's absolute, relative, a root or a UNC, and finally, quick conversions from relative to absolute or absolute to relative.

Note paths are automatically kept in a standard form, where:

  • all slashes '/' are converted to backslashes '\'.
  • multiple backslashes in a row are collapsed down to one: '\\\' becomes '\'

Normalization is a separate, explicit method that must be called by the client. Normalization removes null directories \\.\\ and adds in any missing backslash after the drive letter. Wherever possible, normalization will resolve out any ".." path components so: "r:\\dirA\\dirB\\..\\dirC" becomes "r:\\dirA\\dirC." If these hit the root, they just get stripped off, so "r:\\.." normalizes to "r:\\" If the path is relative, and there are more ".."s than preceding directories, the extra sets are kept at the start of the path: "b\\..\\..\\c" becomes "..\\c" Any trailing backslash is kept on the path for compatibility with many win32 API functions. If a uniform trailing-backslash format is desired, for example, for display in the UI, it is up to client-level code to implement this policy. Unresolved symbols are left intact during normalization. Resolving the symbols in a string normalizes automatically.

To reiterate, normalization as performed by the Normalize() method is different from the basic standard form maintained by all members of Path. The client must call Normalize() explicitly (or ResolveSymbols() which is the only method that calls Normalize() automatically). The reason that these are kept separate is to keep from radically modifying a path in a way that may be surprising to a user. If the user wishes to construct a path with many '..\'s in it, the user will expect to see this result. Normalize() may then be called subsequently when it is deemed appropriate.

To illustrate the difference:

  • "/a/b/c/./../" is neither in standard form nor normalized.
  • "\\a\b\\c\\.." and "\\a\b\\c\\." are in standard form but not normalized.
  • "\\a\b" and "\\a\b\\c" are both in standard form and normalized.

Constructor & Destructor Documentation

◆ Path() [1/4]

Default constructor - creates an empty path.

Postcondition
IsEmpty() returns true.

◆ Path() [2/4]

UtilExport Path ( const MSTR pathString)

Construct a path from a path-filename string.

Parameters
pathStringpath & filename as a string from which to construct a path object.

◆ Path() [3/4]

UtilExport Path ( const MCHAR pathString)

Construct from a null-terminated path-filename MCHAR array.

Parameters
pathStringpath & filename (must be null-terminated).
Precondition
pathString is null terminated.

◆ Path() [4/4]

UtilExport Path ( const Path other)

Copy construct a Path from another.

This performs a deep copy. Subsequent operations on this path will not affect the copied path and vice versa.

Parameters
otherThe path to copy.

◆ ~Path()

Destructor.

Member Function Documentation

◆ SetPath() [1/3]

UtilExport Path& SetPath ( const Path other)

Set this Path from another.

Equivalent to the assignment operator, but more verbose.

Parameters
other- path to copy.

◆ SetPath() [2/3]

UtilExport Path& SetPath ( const MCHAR pathString)

Set this Path's internal string from a null terminated character string.

Equivalent to the assignment operator, but more verbose.

Parameters
pathStringnull-terminated character string to copy into this path.

◆ SetPath() [3/3]

UtilExport Path& SetPath ( const MSTR pathString)

Set this Path from a MSTR.

Equivalent to the assignment operator, but more verbose.

Parameters
pathStringMSTR to copy into this path.

◆ operator=() [1/3]

UtilExport Path& operator= ( const Path other)

Assignment operator.

Parameters
other- path to copy

◆ operator=() [2/3]

UtilExport Path& operator= ( const MCHAR pathString)

Assignment operator taking a null terminated character string.

Parameters
pathStringnull-terminated character string to copy into this path.

◆ operator=() [3/3]

UtilExport Path& operator= ( const MSTR pathString)

Assignment operator.

Parameters
pathStringMSTR to copy into this path.

◆ IsAbsolute()

UtilExport bool IsAbsolute ( ) const

Get whether this is an absolutely specified path.

An absolute path is rooted from a starting backslash (\), drive letter or UNC hostname.

Returns
Returns true if this is an absolute path.

◆ IsEmpty()

UtilExport bool IsEmpty ( ) const

Get whether this is an empty path.

An empty path has a backing string representation of "".

Returns
true if this is an empty path. Returns false otherwise.

◆ IsLegal()

UtilExport bool IsLegal ( ) const

Query whether this path doesn't have any illegal characters according to the Windows platform rules.

Illegal characters are ':' for any character but the second and any occurrence of * ? " < > or |.

Returns
true if the path appears to be legal, false if an illegal character was found.

◆ IsRoot()

UtilExport bool IsRoot ( ) const

Check if this path is just a root.

Possible roots are:

  • just backslash "\\"
  • drive letter "c:\\"
  • unc host "\\\\host"
  • unc share "\\\\host\\share"

Note that all roots are absolute paths, but not all absolute paths are roots.

The host or drive letter does not have to exist. This path just has to fit the pattern.

Returns
true if this path fits one of the patterns for a root outlined above, false other wise.

◆ IsUnc()

UtilExport bool IsUnc ( ) const

Query whether this path is a UNC path.

A UNC path fits "\\\\host" or "\\\\host\\share" or "\\\\host\\share\\subdirectory\\". The host doesn't necessarily have to exist.

Returns
true if this path is a UNC, false otherwise.

◆ IsUncShare()

UtilExport bool IsUncShare ( ) const

Query whether this path fits the pattern for a UNC share.

The UNC share pattern is \\host\share.

Returns
true if this path is a UNC share. False, otherwise.

◆ IsRootedAtBackslash()

UtilExport bool IsRootedAtBackslash ( ) const

Query whether this path is rooted at backslash, that is at the current drive with no drive letter.

e.g. "\\abc\\def" is rooted at backslash.

Returns
true if the first character is '\' and this is not a UNC.

◆ IsRootedAtDriveLetter()

UtilExport bool IsRootedAtDriveLetter ( ) const

Query whether this path is rooted at a drive letter.

Returns
true if this path is rooted at a drive letter like "c:\\dir\\dir"

◆ HasUnresolvedSymbols()

UtilExport bool HasUnresolvedSymbols ( ) const

Query whether unresolved symbols remain in this string.

Returns
true if there are symbols yet to be resolved, false if all symbols have been resolved.

◆ StartsWithUpDirectory()

UtilExport bool StartsWithUpDirectory ( ) const

Query with this path, when normalized, starts with "..".

Returns
true if normalizing the path causes it to be relative to an ancestor path - ie, it starts with ".." False, otherwise.

◆ IsEqual()

UtilExport bool IsEqual ( const Path other) const

Query whether this and the passed-in path are exactly the same.

This does not perform any path resolution to try to determine if the paths point to the same file. To be equal, the two paths must have exactly the same current representation.

Parameters
othera path to check for equality with this one.
Returns
true if both paths are exactly the same.

◆ operator==()

UtilExport bool operator== ( const Path other) const

Query whether this and the passed-in path are exactly the same.

This is a convenience operator overload. It calls IsEqual() under the hood.

Parameters
othera path to check for equality with this one.
Returns
true if both paths are exactly the same.

◆ ResolvesEquivalent()

UtilExport bool ResolvesEquivalent ( const Path other) const

Query whether this and the passed-in path currently point to the same location.

This may not remain true (or false) if the paths contain symbols that may resolve differently later on.

Parameters
othera path to check for equivalence with this one
Returns
true if both paths resolve out to pointing to the same location, false otherwise.

◆ HasTrailingBackslash()

UtilExport bool HasTrailingBackslash ( ) const

Query whether this path has a trailing backslash.

Returns
true if this path has a trailing backslash.

◆ AddTrailingBackslash()

UtilExport Path& AddTrailingBackslash ( )

Add a backslash to the end of this path if there isn't one already.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ RemoveTrailingBackslash()

UtilExport Path& RemoveTrailingBackslash ( )

Remove any trailing backslash from this path.

Does nothing if there is no trailing backslash.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ Prepend()

UtilExport Path& Prepend ( const Path newParent)

Add a new parent path to the start of this path.

While the usual cleaning up is done, Normalization is not performed. No checking is performed to verify that the resulting path will be legal. Generally, this Path should be relative while the new parent path may be absolute or relative.

Examples:

  • Path("a\\b\\c").Prepend(Path("e\\f\\g")) produces Path("e\\f\\g\\a\\b\\c")
  • Path("c:\\").Prepend(Path("e\\f\\g")) produces Path("e\\f\\g\\c:")
  • Path("a\\b\\c").Prepend(Path("c:\\")) produces Path("c:\\a\\b\\c")
  • Path("").Prepend(Path("e\\f\\g")) produces Path("e\\f\\g")
  • Path("..\\d").Prepend(Path("e\\f\\g")) produces Path("e\\f\\g\\..\\d") and normalizes to Path("e\\f\\d") after a call to Normalize()

To convert a relative path to an absolute path with an arbitrary base, simply Prepend that base to this relative path.

Parameters
newParentThe new parent path to place at the start of this path.
Returns
A reference to this Path. (This allows for operation chaining.)

◆ Append()

UtilExport Path& Append ( const Path relativeChild)

Add a new child path at the end of this path.

While the usual cleaning up is done, Normalization is not performed. No checking is performed to verify that the resulting path will be legal. Generally, the new child should be relative should be relative, while this base path may be absolute or relative.

Examples:

  • Path("a\\b\\c").Append(Path("e\\f\\g")) produces Path("a\\b\\c\\e\\f\\g")
  • Path("c:\\").Append(Path("e\\f\\g")) produces Path("c:\\e\\f\\g")
  • Path("a\\b\\c").Append(Path("c:\\")) produces Path("a\\b\\c\\c:")
  • Path("").Append(Path("e\\f\\g")) produces Path("e\\f\\g")
  • Path("a\\b\\c").Append(Path("..\\d")) produces Path("a\\b\\c\\..\\d") and normalizes to Path("a\\b\\d") after a call to Normalize()
Parameters
relativeChildthe new relative child component for this path.
Returns
A reference to this Path. (This allows for operation chaining.)

◆ StripToTopParent()

UtilExport Path& StripToTopParent ( )

Strip all but the topmost parent from this path.

Examples:

Returns
A reference to this Path. (This allows for operation chaining.)

◆ RemoveTopParent()

UtilExport Path& RemoveTopParent ( )

Remove the topmost parent from this path.

Examples:

Returns
A reference to this Path. (This allows for operation chaining.)

◆ StripToLeaf()

UtilExport Path& StripToLeaf ( )

Strip all but the very last child from this path.

Examples:

Returns
A reference to this Path. (This allows for operation chaining.)

◆ RemoveLeaf()

UtilExport Path& RemoveLeaf ( )

Remove the very last child from this path.

Examples:

Returns
A reference to this Path. (This allows for operation chaining.)

◆ ResolveSymbols()

UtilExport Path& ResolveSymbols ( )

Resolve out any symbols in the path string.

After resolving the symbols, normalization is performed automatically. At the moment, this is an internal feature to 3ds Max, but is exposed to the SDK to support future functionality.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ Normalize()

UtilExport Path& Normalize ( )

Transform this path into its normal form.

This will clean up pieces not following the backslash rules outlined in the class documentation, and will convert ".."s as much as possible. "r:\\dirA\\dirB\\..\\dirC" becomes "r:\\dirA\\dirC." If these hit the root, they just get stripped off, so "r:\\.." normalizes to "r:\\" If the path is relative, and there are more ".."s than preceding directories, the extra sets are kept at the start of the path: "b\\..\\..\\c" becomes "..\\c"

Any symbols in the path will be maintained since a symbol may resolve out to more than one directory.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ ConvertToLowerCase()

UtilExport Path& ConvertToLowerCase ( )

Convert all the characters in this path to lower case.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ ConvertToRelativeTo()

UtilExport Path& ConvertToRelativeTo ( const Path newBase)

Convert this absolute Path so that it points to the same location, but relative to the new base path.

The following attempted conversions are invalid and will leave the path unchanged:

  • this path is already relative
  • newBase is a relative path
  • this path and newBase are both absolute but on different drives or hosts.

Example: Path("c:\\a\\b\\c").ConvertToRelativeTo(Path("c:\\a\\b\\d") produces Path("..\\c")

Parameters
newBaseabsolute base path from which this Path must later be rooted to point to its current location again.
Returns
A reference to this Path. (This allows for operation chaining.)

◆ ConvertToUNC()

UtilExport Path& ConvertToUNC ( )

Convert this mapped drive Path to a UNC path with a host and share name.

This operation only modifies the path if it is rooted at a valid mapped drive.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ ConvertToAbsolute()

UtilExport Path& ConvertToAbsolute ( )

Convert this relative path to absolute rooted at the current 3ds Max Project Folder.

This will automatically resolve any symbols and normalize this path. If this Path already resolves to an absolute Path, it will ignore the current working directory. This does not resolve the path using the 3ds Max file search mechanism.

If conversion to an arbitrarily-rooted absolute path is desired, Prepend should be used instead.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ GetResolvedAbsolutePath()

UtilExport const Path& GetResolvedAbsolutePath ( ) const

Get the fully-resolved, lower case, path converted to absolute rooted at the current 3ds Max Project Folder.

This is a performance-oriented convenience method for clients that wish to hold on to the original, unresolved, relative path yet often need to access the absolute path.

Returns
This path after it's been fully resolved, converted to absolute (rooted at the Project Folder), and converted to lower case.

◆ ConvertToRelativeToProjectFolder()

UtilExport Path& ConvertToRelativeToProjectFolder ( )

Converts an absolute path into a path that is relative to the current Project Folder.

Converts an absolute path into a path that is relative to the current Project Folder. If the path cannot be made relative (if it is rooted on a different drive, for instance), then it is left untouched. If the path is already relative, it is also left untouched.

Returns
A reference to this Path. (This allows for operation chaining.)

◆ Exists()

UtilExport bool Exists ( )

Queries whether the file or directory exists.

This works on both files and directories.

Returns
- true if the path exists and false otherwise

◆ IsRootedToFolder()

UtilExport bool IsRootedToFolder ( const Path folder) const

Queries whether the file or directory is rooted to the specified folder.

This works on both files and directories.

Returns
- true if the file or directory is rooted to the specified folder and false otherwise

◆ GetString()

UtilExport MSTR GetString ( ) const

Get the current string representation of this path.

Note that this does not perform any symbol resolution or normalization.

Returns
A copy of this Path's current string representation.

◆ GetCStr()

UtilExport const MCHAR* GetCStr ( ) const

Get the internal c-string formatted data representation for this path.

Note that this c-string is not guaranteed to be consistent after any modifications are made to the Path object. If the data is needed persistently, consider either copying the contents of this pointer, or calling GetString() instead.

Returns
A null-terminated c-string representation of the internals of this object.

◆ SaveBaseFile()

UtilExport bool SaveBaseFile ( ) const

Creates base file to support incremental upload of Autodesk 360 files if applicable.

This function should be called before a file which is in sync is overwritten with a new version (typically during save operation). This is necessary to support incremental upload of the file. It must be called every time the file is overwritten (i.e. on every save). This function creates a base file using the current version which will be used by the sync engine to upload only the changes. If the file specified by this path is not an Autodesk 360 sync'ed file, no action occurs as a result of this call.

Returns
True if a base file was created

◆ GetImpl() [1/2]

PathImpl& GetImpl ( )

Not exported outside the DLL - for use by PathImpl only.

Returns
The internal implementation of this Path.

◆ GetImpl() [2/2]

const PathImpl& GetImpl ( ) const

Not exported outside the DLL - for use by PathImpl only.

Same as the other version, but this one's for const-context.

Returns
The internal implementation of this Path.