www.icetips.com  Icetips Utilities Documentation 5/9/2015    

Core Class: GetFileAttrib

Previous  Top  Next  


Prototype: (String pFile, <*Byte pReadOnly>, <*Byte pHidden>, <*Byte pSystem>),Long,PROC

 

pFileName of the file to check
pReadOnlyOptional parameter to receive the Read-Only bit
pHiddenOptional parameter to receive the Hidden bit
pSystemOptional parameter to receive the System bit

 

ReturnsReturns 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:

SetFileAttrib

 

 

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getfileattrib_core.htm