Represents a virtual path mapping.
sealed class
|
VirtualPath
|
implements
|
IConfigurable
|
||
IEquatable<VirtualPath>
|
|||||
IValidatable
|
See also:
VirtualFileSystemThe configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<VirtualPath>
|
||
value
|
|
The configurator object. |
The configurator object for VirtualPathUsage.
public
static
readonly
field
|
ConfigUsage
|
||
type
|
IConfigurator<VirtualPathUsage>
|
The path in the filesystem.
public
readonly
field
|
FileSystem
|
||
type
|
Path
|
Remarks:
This
value
is
never
null
and
always
in
canonical
form
(see
Canonical).
The mapped virtual resource path.
public
readonly
field
|
Mapped
|
||
type
|
Path
|
Remarks:
This
value
is
never
null
,
always
absolute
and
does
not
have
a
root
selector.
The usage flag of this resource path mapping.
public
readonly
field
|
Usage
|
||
type
|
VirtualPathUsage
|
Creates a new instance of VirtualPath.
public
constructor
|
VirtualPath
(Path fileSystem,
Path mapped = null,
VirtualPathUsage usage = VirtualPathUsage.Read)
|
||
params
|
fileSystem
|
[not-null]
|
The resource path in the filesystem. |
mapped
|
The
mapped
engine
resource
path.
If
null
the
fileSystem
path
will
be
mapped
to
root
(i.e.
'/' ).
Defaults
to
null .
|
||
usage
|
The resource path usage flag. Defaults to Read. |
Compares this object with the given one.
[Pure]
|
||||
public
method
|
Equals
(VirtualPath other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
implements
|
IEquatable.Equals
|
Returns the configuration value that describes this object.
public
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
implements
|
IConfigurable.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Converts the given mapped path into a filesystem path.
public
method
|
ToFileSystem
(Path mapped,
string rootSelector = null)
|
||
type
|
Path
|
||
params
|
mapped
|
[not-null]
|
The mapped path. |
rootSelector
|
The
filesystem
root
selector
or
null .
Defaults
to
null .
|
||
returns
|
The
filesystem
path
or
null
if
there
is
no
suitable
mapping. |
Converts the given filesystem path into a mapped path.
public
method
|
ToMapped
(Path fileSystem,
string rootSelector = null)
|
||
type
|
Path
|
||
params
|
fileSystem
|
[not-null]
|
The filesystem path. |
rootSelector
|
The
filesystem
root
selector
or
null .
Defaults
to
null .
|
||
returns
|
The
mapped
path
or
null
if
there
is
no
suitable
mapping. |
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|
Validates the state of this object.
public
method
|
Validate
(Validator validator)
|
||
params
|
validator
|
[not-null]
|
The validator object. |
implements
|
IValidatable.Validate
|