|
Previous Top Next |
Prototype: | (String pFile, <*Byte pReadOnly>, <*Byte pHidden>, <*Byte pSystem>),Long,PROC |
pFile | Name of the file to check |
pReadOnly | Optional parameter to receive the Read-Only bit |
pHidden | Optional parameter to receive the Hidden bit |
pSystem | Optional parameter to receive the System bit |
Returns | Returns the file attribute as returned by the GetFileAttributes api. |
This method retrieves the file attribute for the specified file, i.e. if it is a read-only, hidden or system file. You can pass in byte variables to receive the information. It is overloaded with a method that takes a *CString parameter so it can be used with both String and CString variables.
Example:
ITC ITCoreClass
f CString(2049)
ro Byte
hi Byte
sy Byte
Code
f = 'c:\temp\myfile.txt'
ITC.GetFileAttrib(f,ro,hi,sy)
! ro, hi and sy will now either be true or false depending on if the individual attributes are set for the file.
See also: