PhoenixmlDb.XQuery
AuthorizedFile
Opens a file that a authorised, and checks the file it opened. resolves every symbolic link along a path and judges where it leads; a reader then opened the path again by name. Between the two, a link could be put in place of a file or a directory on the path, and the reader followed it to a file the policy does not allow. Here the file is opened first, and the policy judges the path of the file actually open, which the operating system reports for the handle. A file whose path the platform cannot report is refused when the path to it has changed since it was authorised.
#AuthorizedFile
Namespace: PhoenixmlDb.XQuery.Security
Opens a file that a
authorised, and checks the file it opened.
resolves every symbolic link along a path and judges where it leads; a reader then opened the path again by name. Between the two, a link could be put in place of a file or a directory on the path, and the reader followed it to a file the policy does not allow. Here the file is opened first, and the policy judges the path of the file actually open, which the operating system reports for the handle. A file whose path the platform cannot report is refused when the path to it has changed since it was authorised.
#Methods
#OpenRead(PhoenixmlDb.XQuery.Security.ResourcePolicy,Uri,PhoenixmlDb.XQuery.Security.ResourceAccessKind,String)
Opens the file at
, a
file:
URI that
returned from
, for reading.
Parameters:
-
policy— The policy that authorised it; null where no policy applies. -
authorized— The authorisedfile:URI. -
access— The kind of access that was authorised. -
requested— What was asked for, for the refusal: never the path it leads to.
Exceptions:
-
ResourceAccessDeniedException— The file open is not one the policy allows.
#OpenedPath(Microsoft.Win32.SafeHandles.SafeFileHandle)
The path of the file
has open, with every link resolved, as the operating system reports it; null where it does not.
#ReadAllBytesAsync(PhoenixmlDb.XQuery.Security.ResourcePolicy,Uri,PhoenixmlDb.XQuery.Security.ResourceAccessKind,String,Threading.CancellationToken)
The bytes of an authorised file.
#ReadAllText(PhoenixmlDb.XQuery.Security.ResourcePolicy,Uri,PhoenixmlDb.XQuery.Security.ResourceAccessKind,String)
The text of an authorised file, read synchronously.
#ReadAllTextAsync(PhoenixmlDb.XQuery.Security.ResourcePolicy,Uri,PhoenixmlDb.XQuery.Security.ResourceAccessKind,String,Text.Encoding,Threading.CancellationToken)
The text of an authorised file, decoded as
does.