IsAbsolutePath (XSIUtils)

Introduced

7.0

Description

Returns true if the file path given is an absolute path. An absolute path is a path that can be resolved from the root of the file system. On the Windows platform, this means either a path that starts with a drive letter or a full UNC path. On Linux, it means a path that starts with a slash ('/')

Note: It is not necessary for the path to exist before calling this function.

Scripting Syntax

    XSIUtils.IsAbsolutePath( Path )

C# Syntax

    Boolean XSIUtils.IsAbsolutePath( String in_Path );

Parameters

Parameter | Type | Description
Path | String | A file path to test for whether it is absolute or not.

Return Value

Boolean

Examples

JScript Example

    if( XSIUtils.IsWindowsOS() ) {
    Application.LogMessage( XSIUtils.IsAbsolutePath( "..\Scenes\XSI.scn" ) );
    Application.LogMessage( XSIUtils.IsAbsolutePath( "C:\Windows" ) );
    } else {
    Application.LogMessage( XSIUtils.IsAbsolutePath( "../Scenes/XSI.scn" ) );
    Application.LogMessage( XSIUtils.IsAbsolutePath( "/var/tmp" ) );
    }

    // Example output on either platform:
    // INFO : False
    // INFO : True

See Also

XSIUtils.ResolvePath | XSIUtils.BuildPath | XSIUtils.Slash

Autodesk Softimage v7.5