checkpath is a function that allows you to verify if a file path is in the white list of the engine and can be accessed.
Syntax : checkpath(FILE_PATH,ACCESS_MODE)
Parameters:
-
FILE_PATH is the path of a file or a directory which accessibility must be checked. The files do not need to exist, the only check that is done is the control against the white list. For example, if C:\tmp\subdir\myfile.src is checked and if C:\tmp is in the white list, the return is positive even if the subdir folder does not exist.
-
ACCESS_MODE can have the value 0 (if you want to check the read access) or 1 (if you want to check the write access).
This function returns a 1 if the requested access rights are not denied by the white list definition; otherwise it returns a 0.
Example:
Local Integer I : I= checkpath(“D:\Projects\Biorec-OTL\SPEZOTL_TRT”,0)
infbox ”+num$(I)
Hope this blog helps!
About Us:
Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.
Greytrix have some unique solutions of Sage X3’s integration with Sage CRM, Salesforce.com and Magento eCommerce. It also offers best-in-class Sage X3 customization and development services to Sage business partners, end users, and Sage PSG worldwide.
For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com . We will be glad to assist you.
Also Read:
- Extracts the Nth character of a CHAR or CLOB variable
- How to Validate Postal code Field in Sage x3
- How to Lock Folder in Sage X3
- How To Get folder path in Sage X3 Version 7 or higher
- How to get Folder Path in Sage X3