FilePath Class Reference

Represents and validates a file pathname, rather than a directory pathname. More...

#include <pathname.h>

Inheritance diagram for FilePath:

PathName CCObject SimpleCCObject List of all members.

Public Member Functions

 FilePath ()
 FilePath class constructors.
 FilePath (const FilePath &)
 FilePath (const String_256 &)
BOOL SetFilePath (const String_256 &)
 Parses a string representing a path and sets up the class variables filetype, filename and location if the path is valid otherwise it sets them to null strings.
virtual BOOL IsValid (const String_256 &) const
 Parses a string representing a file path and sets up the class variables filetype, filename and location if the path is valid. Cannot do the usual 8.3 checking of things like filenames as this is no longer valid given Chicago and NT non-FAT filing systems.
virtual BOOL IsValid () const
 Says whether the pathname currently in the class has been parsed correctly. This should only be used if the non-blank contructors have been called and more specifically the contructor which takes a pathname as a parameter has been used. This function then returns the result of the validation that happens in the constructor as of course constructors cannot return results!

Protected Member Functions

virtual BOOL IsValidAndReturnInfo (const String_256 &, String_256 &, String_256 &, String_256 &, String_256 &, BOOL=TRUE) const
 Parses a string representing a path and returns the filetype, filename and location to the caller if the path is valid. Cannot do the usual 8.3 checking of things like filenames as this is no longer valid given Chicago and NT non-FAT filing systems. Routine called by IsValid to actually go and do the work involved with checking the pathname. Done this way so that internal calls do not have to parse the data again to get at the variables.

Detailed Description

Represents and validates a file pathname, rather than a directory pathname.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/2/1996
Returns:
Errors: None.

Definition at line 205 of file pathname.h.


Constructor & Destructor Documentation

FilePath::FilePath  ) 
 

FilePath class constructors.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/2/96

Definition at line 1796 of file pathname.cpp.

01796                    : PathName()
01797 {
01798 }

FilePath::FilePath const FilePath  ) 
 

Definition at line 1799 of file pathname.cpp.

01799                                           : PathName(newPath)
01800 {
01801 }

FilePath::FilePath const String_256  ) 
 

Definition at line 1802 of file pathname.cpp.

01802                                          : PathName(path)
01803 {
01804 }


Member Function Documentation

BOOL FilePath::IsValid  )  const [virtual]
 

Says whether the pathname currently in the class has been parsed correctly. This should only be used if the non-blank contructors have been called and more specifically the contructor which takes a pathname as a parameter has been used. This function then returns the result of the validation that happens in the constructor as of course constructors cannot return results!

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/2/96
Returns:
TRUE if the present pathname has been parsed successfully or FALSE otherwise
See also:
FilePath::IsValid(const String_256& path);
Returns:
Errors: If it fails then it will call set error with the error found.

Reimplemented from PathName.

Definition at line 1864 of file pathname.cpp.

01865 {
01866     return PathName::IsValid();
01867 }

BOOL FilePath::IsValid const String_256 path  )  const [virtual]
 

Parses a string representing a file path and sets up the class variables filetype, filename and location if the path is valid. Cannot do the usual 8.3 checking of things like filenames as this is no longer valid given Chicago and NT non-FAT filing systems.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/2/96
Parameters:
path - String representing a pathname [INPUTS]
Returns:
TRUE if the file pathname is parsed successfully or FALSE otherwise

Errors: If it fails then it will call set error with the error found.

Reimplemented from PathName.

Definition at line 1842 of file pathname.cpp.

01843 {
01844     return PathName::IsValid(path);
01845 }

BOOL FilePath::IsValidAndReturnInfo const String_256 ConstPath,
String_256 tempFilename,
String_256 tempLocation,
String_256 tempFiletype,
String_256 tempDrivename,
BOOL  SetErrors = TRUE
const [protected, virtual]
 

Parses a string representing a path and returns the filetype, filename and location to the caller if the path is valid. Cannot do the usual 8.3 checking of things like filenames as this is no longer valid given Chicago and NT non-FAT filing systems. Routine called by IsValid to actually go and do the work involved with checking the pathname. Done this way so that internal calls do not have to parse the data again to get at the variables.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/2/96
Parameters:
ConstPath - String representing the pathname to check [INPUTS] SetErrors - Flag to say whether we should set errors or not (defaults to TRUE)
tempFilename - String representing the filename [OUTPUTS] tempLocation - String representing the location tempFiletype - String representing the filetype tempDrivename - String representing the drive name
Returns:
TRUE if the pathname is parsed successfully or FALSE otherwise

Errors: If it fails then it will call set error with the error found. This can now be supressed if required.

Reimplemented from PathName.

Definition at line 1898 of file pathname.cpp.

01900 {
01901     return PathName::IsValidAndReturnInfo(ConstPath, tempFilename, tempLocation, tempFiletype,
01902         tempDrivename, SetErrors);
01903 }

BOOL FilePath::SetFilePath const String_256 path  ) 
 

Parses a string representing a path and sets up the class variables filetype, filename and location if the path is valid otherwise it sets them to null strings.

Author:
Richard_Millican (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/2/96
Parameters:
path - String representing a file + its pathname [INPUTS]
Returns:
TRUE if the file pathname is parsed successfully or FALSE otherwise

Errors: None

Definition at line 1821 of file pathname.cpp.

01822 {
01823     return PathName::SetPathName(path);
01824 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:54:10 2007 for Camelot by  doxygen 1.4.4