Skip to main content

%SYS.FileSystemAccess

persistent class %SYS.FileSystemAccess extends %Library.Persistent, %XML.Adaptor, %SYSTEM.Help [ Final ]

SQL Table Name: %SYS.FileSystemAccess

Property Inventory

Method Inventory

Parameters

parameter RESOURCEREQUIRED = %Admin_FileSystemAccess;

Properties

property Purpose as %String (MAXLEN = 64) [ Required ];
Property methods: PurposeDisplayToLogical(), PurposeGet(), PurposeGetStored(), PurposeIsValid(), PurposeLogicalToDisplay(), PurposeLogicalToOdbc(), PurposeNormalize(), PurposeSet()
property RootPath as %String (MAXLEN = 1024) [ Required ];
Property methods: RootPathDisplayToLogical(), RootPathGet(), RootPathGetStored(), RootPathIsValid(), RootPathLogicalToDisplay(), RootPathLogicalToOdbc(), RootPathNormalize(), RootPathSet()

Methods

classmethod ClearPathsForPurpose(Purpose As %String) as %Status
Removes all root paths associated with the given purpose.
This does not modify the purpose-level restriction flag.
Requires %Admin_FileSystemAccess:USE privilege.
Parameters:
Purpose - The purpose to clear all paths for
classmethod ClearPurpose(Purpose As %String, Output PreviousValue As %Boolean) as %Status
Clear all configuration for a purpose:
Removes all path for the purpose
Removes the purpose-level restriction flag
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Requires %Admin_FileSystemAccess:USE privilege.
Parameters:
Purpose - The purpose to clear all configuration for
PreviousValue - Output parameter indicating the previous value of the restriction flag (1=enabled,0=disabled)
classmethod Create(RootPath As %String, Purpose As %String) as %Status
Create an allowed root path
Create an allowed root path in the Security database.
Purpose parameter is used to group root paths for different purposes and can't be empty.
If the purpose does not exist, a purpose-level restriction flag will be created and disabled by default.
If the purpose already exists, the existing purpose-level restriction flag will not be modified.
Use EnablePurpose() and DisablePurpose() to enable/disable the purpose-level restriction.
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Requires %Admin_FileSystemAccess:USE privilege.
Parameters:
RootPath - The Root path to allow
Purpose - The purpose of the root path
classmethod Delete(RootPath As %String, Purpose As %String) as %Status
Delete an allowed root path
Delete an allowed root path in the Security database.
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Requires %Admin_FileSystemAccess:USE privilege.
Parameters:
RootPath - The root path to delete
Purpose - The purpose of the root path
classmethod DisablePurpose(Purpose As %String, Output PreviousValue As %Boolean) as %Status
Disable purpose-level restriction flag. If the purpose does not exist, it will be created and disabled.
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Requires %Admin_FileSystemAccess:USE privilege.
Parameters:
Purpose - The purpose to disable restriction for
PreviousValue - Output parameter indicating the previous value of the restriction flag (1=enabled, 0=disabled)
classmethod EnablePurpose(Purpose As %String, Output PreviousValue As %Boolean) as %Status
Enable purpose-level restriction flag.
If the purpose does not exist, it will be created and enabled.
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Requires %Admin_FileSystemAccess:USE privilege.
Parameters:
Purpose - The purpose to enable restriction for
PreviousValue - Output parameter indicating the previous value of the restriction flag (1=enabled, 0=disabled)
classmethod Exists(RootPath As %String, Purpose As %String, ByRef PathEntry As %ObjectHandle, ByRef Status As %Status) as %Boolean
Path exists.
This method checks if a root path exists in the security database.
Parameters:
RootPath - The root path
Purpose - The purpose of the root path
Return values:
If Value of the method = 0 (Path does not exist, or some error occurred)
PathEntry = Null
Status = RootPath "x" for purpose "y" does not exist, or other error message

If Value of the method = 1 (Path exists)
PathEntry = Object handle of the path
Status = $$$OK
classmethod GetAllowedRootPaths(Purpose As %String, Output AllowedPaths) as %Status
Get all allowed root paths for a purpose.
If the purpose-level restriction flag is disabled, no paths will be returned.
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Parameters:
Purpose - The purpose to get allowed root paths for
AllowedPaths - Output parameter containing all allowed root paths for the purpose as the keys of the array.
Return values:
Status - $$$OK if successful, error code otherwise.
classmethod IsRestricted(Purpose As %String, Output Status As %Status) as %Boolean
Is purpose restricted.
Check if the purpose-level restriction flag is enabled for the given purpose in the security database.
For restrictions used by the UI file selector, specify the purpose "%GUIFileSelector".
Parameters:
Purpose - The purpose to check for
Return values:
If Value of the method = 0, Purpose has no restriction.
If Value of the method = 1, Purpose has restriction enabled.
classmethod PurposeExists(Purpose As %String) as %Boolean
Purpose exists.
Check if there is a purpose-level restriction flag for the given purpose in the security database.
Parameters:
Purpose - The purpose to check for
Return values:
If Value of the method = 0, Purpose does not exist.
If Value of the method = 1, Purpose exists

Queries

query ListByPurpose(Purpose As %String)
SQL Query:
SELECT * FROM %SYS.FileSystemAccess WHERE Purpose = :Purpose ORDER BY RootPath
List all paths for a purpose.

Indexes

index (PurposeRootPathIndex on Purpose,RootPath) [IdKey, Type = key, Unique];
Index methods: PurposeRootPathIndexCheck(), PurposeRootPathIndexDelete(), PurposeRootPathIndexExists(), PurposeRootPathIndexOpen(), PurposeRootPathIndexSQLCheckUnique(), PurposeRootPathIndexSQLExists(), PurposeRootPathIndexSQLFindPKeyByConstraint(), PurposeRootPathIndexSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

FeedbackOpens in a new tab