Security
Test
test if an operation is permitted
Calling Sequence
Parameters
Description
Examples
Test( op, file )
op
-
a name representing operation
file
a file name as a string
This routine tests if the operation op on the file file is permitted, when tested against the current security settings. Security need not be enabled in order to test the operation.
The Test command returns true if the operation in op on the file file is permitted under the current Security settings, and false otherwise.
The operation op must be one of: `read`, write, or extcall.
For an overview of Maple engine security and an explanation of relevant concepts, see the Maple Engine Security help page.
Security:-Config⁡SECURE_READ_LIST=/tmp/*:
Security:-Test⁡`read`,/tmp/file1
true
Security:-Test⁡`read`,/usr/file1
false
Security:-Test⁡write,/tmp/file1
Security:-Test⁡extcall,/tmp/file1
See Also
EngineSecurity
Security[Config]
Download Help Document