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

Core Class: IsFolder

Previous  Top  Next  


Prototype: (String pPath),String

 

pPathThe path to check if it's a folder or a filename

 

ReturnsReturns TRUE if the pPath is a folder.

 

This method returns true if the path name passed in is a folder and false if it is a file.  You can easily have path named C:\myfile.txt as well as a file named C:\myfile.txt.  The IsFolder method will determine if it is a folder or not and return the appropriate value. 

It is overloaded with a method that takes a *CString parameter so it can be used with both string variables and CString variables.

 

Example:

 

ITC ITCoreClass

Fn  CString(2049)

S   CString(1024)

Code

Fn = ITC.EXEName

S = '"' & Fn & '"' & Choose(ITC.IsFolder(Fn)=True,' IS ',' is NOT ') & 'a folder.'

Fn = LongPath()

S = S & '|' & '"' & Fn & '"' & Choose(ITC.IsFolder(Fn)=True,' IS ',' is NOT ') & 'a folder.'

Message(S,'IsFolder')

 

 

See also:

IsFileInUse

GetFileAttrib

 

 

 



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