DAZ Script | |
---|---|
PartFlag | { NoPart, Scheme, NodePath, ModifierPath, PropertyPath, IDPart, FilePath, AllParts } |
SchemeType | { NoScheme, ID, Name } |
Represents a URI as it is used for the DSON file format. DzUri provides functionality in addition to standard URI/URL representations that is specific to the DSON file format.
DzUri provides for a traditional URI with path and fragment portions. In addition, it further divides the fragment into 1 to 3 parts for ease of use in the DSON file format. The following is an example of a URI as represented by the DzURI class:
/Converted/Victoria4/Victoria4.dsf::rCollar?rotation/x
The file path portion of this URI is: “/Converted/Victoria4/Victoria4.dsf”
The fragment portion of this URI is: “rCollar?rotation/x”
The fragment is further divided into an identifier and a property path. In this case the identifier is “rCollar” and the property path is “rotation/x”.
All the sections of the fragment are optional, however, to be valid, each section in the fragment requires the preceding section to also be valid. So, the following URIs are valid:
And the following URIs are not valid:
Since:
TODO: Add description.
—–
TODO: Add description.
Holds the file path portion of the URI, if any.
Holds the file version of this URI, as a 64 bit unsigned integer. If not read from a file, this will be invalid.
Holds the identifier portion of this URI's fragment, if any.
Holds whether or not this URI was points to a cloud asset.
Holds the modifier path portion of the URI, if any.
Holds the node path portion of this URI, if any.
Holds the property portion of the URI, if any.
SchemeType : schemeType
Holds the scheme type for this URI. Default is SchemeType::ID.
String : escape( String str, ByteArray exclude, ByteArray closer )
Escapes any reserved characters in the in the given string.
Parameter(s):
Return Value:
String : escapedPath( Array list, ByteArray exclude, ByteArray include )
Converts the string list into an escaped path string.
Parameter(s):
Return Value:
DzUri : fromLocalFilename( String filePath )
Creates a new URI using the path of a local file.
Parameter(s):
String : unescape( String str )
Converts any escape sequences in the given string back to the corresponding character.
Parameter(s):
Return Value:
Array : unescapePath( String path )
Converts the string into a string list of unescaped path pieces.
Parameter(s):
DzUri()
Default constructor. Creates an empty URI.
DzUri( DzUri uri )
Copy constructor. Creates a URI as a copy of another URI.
Constructor. Creates a URI from its string representation.
void : clear()
Clears the current values of this URI.
void : clearFoundLocalFilename()
Clears internal cache of the last place toLocalFilename/toLocalFilenameByPreferredPath returned.
void : detach()
Detaches this URI from any shared data. Makes the underlying data in this URI unique from all other URIs.
Return Value:
true
if this URI is empty, otherwise false
.Return Value:
true
if this URI is null, otherwise false
. A DzUri may be empty without being Null, but a Null uri is always empty.Since:
Sets the value of this URI from a string representation of the full URI.
Parameter(s):
String : toLocalFilename( String preferredPath )
Attempts to convert the URI to the path of a local file.
Parameter(s):
Return Value:
Attempts to convert the URI to the path of a local file.
Return Value:
String : toPath( String preferredPath=“” )
Attempts to convert the URI to the path of a local file.
Parameter(s):
Return Value:
Since:
Return Value:
String : toString( PartFlags flags )
Return Value:
flags
.