Determine if the client has permission to access the specified
virtual path.
Syntax
object.CheckPath(
ClientId,
VirtualPath,
[AccessFlags] )
Parameters
- ClientId
- An integer value which identifies the client session.
- VirtualPath
- A string which specifies the virtual path that will be created.
The path must be absolute and cannot be an empty string. The maximum length of
the virtual path is 1024 characters.
- AccessFlags
- An optional integer value which specifies the access permissions
that should be checked. This value created
from one or more bit flags. For a list of access permissions,
see User and File Access
Constants. If this parameter is omitted, the method checks to
ensure the client has read access to the virtual path.
Return Value
A Boolean value that specifies if the client has access to the
virtual path. A return value of True indicates that the virtual
path exists and the client has the requested permissions. A return
value of False indicates that the path does not exist, or the
client does not have the requested access to the file or directory.
Remarks
The CheckPath method is used to determine
if the client has permission to access the virtual file or directory,
based on the value of the AccessFlags parameter. For example,
if the AccessFlags parameter has the value httpAccessWrite,
this method will check if the client has write permission for the
file or directory. The method will return a non-zero value if the
client does have the requested permission, or zero if it does not.
Applications that implement their own custom handlers for standard
HTTP commands should use this method to ensure that the client has
the appropriate permissions to access the requested resource. Failure
to check the access permissions for the client can result in the
client being able to access restricted documents and other resources.
It is recommended that most applications use the default command
handlers.
To obtain the path to the local file or directory that the virtual
path is mapped to, use the ResolvePath method.
See Also
ClientAccess Property,
LocalPath Property,
VirtualPath Property,
AddPath Method,
DeletePath Method,
ResolvePath Method
|