|
Previous Top Next |
Prototype: | (String pPath),Byte |
pPath | The path to check if it can be written to. |
Returns | Returns either TRUE if the folder can be written to or FALSE if it cannot be written to. |
This method can be used to test if a specific folder can be written to or not. If it cannot the error information are available in the LastAPIError and LastAPIErrorCode properties immediately after calling the method. The way the method works is that it attempts to create a temporary file in the folder. The filename is made up of a tilde character, a GUID and has a .tmp extension. An example: ~4944E145-1D36-401B-AD01-922685E0CA90.tmp
Example:
ITC ITCoreClass
PFN CSTRING(1025)
CODE
PFN = 'C:\temp'
IF NOT ITC.IsFolderWritable(PFN)
MESSAGE('The project folder cannot be written to "' &|
ITC.GetFilePart(PFN, FNS_FullPath) & '"', |
'ERROR: Cannot write to this folder')
END
See also: