Collection of activities about security.
Activity to check if the path is not too long (according to supportLongPath) and if it doesn't contain specific invalid characters like below: \ / : * ? \" < > |.
| Technical Name |
Type |
Minimal Agent Version |
| checkPath |
synchronous
|
WIN-3.24, MAC-3.24, CLOUD-3.34
|
Input Parameters:
| Name |
Type |
Attributes |
Default |
Description |
| path |
string |
mandatory
|
|
The path to validate. |
| rule |
irpa_core.enums.checkPathRules |
optional
|
None |
Additional rule to validate the path. |
| supportLongPath |
boolean |
optional
|
false |
Extend the support to a long path (If false, the path can have 256 characters, otherwise the path is limited to 32000). |
| checkIfAbsolute |
boolean |
optional
|
false |
Check if the path is an absolute path. If the input parameter path is not an absolute path, the output will be false. |
Output Parameters:
| Name |
Type |
Description |
| isValid |
boolean |
Is a valid path. |
Sample Code:
const isValid = await irpa_core.security.checkPath('path', irpa_core.enums.checkPathRules.None, true)