![]() |
Humble Framework for SkyOS |
#include <HFile.h>
Inheritance diagram for HFilename:

Public Member Functions | |
| HFilename (StringPtr pstr=NULL) | |
| bool | Select (StringPtr pstrTitle, uint32 uFlags, sSelectFileTypes *pFileTypes=NULL) |
| Lets the user select the filename. | |
| ErrCode | GetDir (HString &strDir, bool bWantSlash=false) const |
| Returns the directory portion of the file name. | |
| ErrCode | SetDir (StringPtr pstrDir) |
| Sets the directory without changing the file or the extension. | |
| ErrCode | GetExt (HString &strExt, bool bWantDot=false) const |
| Returns the file's extension. | |
| ErrCode | SetExt (StringPtr pstrExt) |
| Sets the directory without changing the file or the extension. | |
| ErrCode | GetName (HString &strName) const |
| Returns the file's name. | |
| StringPtr | GetPath (void) const |
| Returns the file's name. | |
| bool | IsValid (void) const |
| Returns true if the current filename is valid. | |
| HFilename & | operator= (StringPtr pstr) |
Protected Member Functions | |
| void | build (StringPtr pstrDir, StringPtr pstrFile, StringPtr pstrExt) |
| Create a fully-qualified filename (FQF) given a path and file name. | |
| void | cleanUp (void) |
| Sets all the slashes to the desired type. | |
| void | split (TextPtr pstrDir, TextPtr pstrName, TextPtr pstrExt) |
| Splits a fully-qualified filespec (FQF) into it's component parts. | |
Friends | |
| class | HFile |
|
||||||||||||||||
|
This method allos the user to select a file from the OS using the generic "File Open" dialog.
|
|
||||||||||||||||
|
|
|
|
This method scans the string looking for improper slashes and corrects them. It also removes all leading and trailing whitespace. |
|
||||||||||||||||
|
|
|
||||||||||||
|
This method returns a string containing the directory portion of the FQF, or an empty string if no directory is present. For example, if the FQF is "/boot/home/humble/projects/humble.mak", then GetDir() will return "/boot/home/humble/projects" or "/boot/home/humble/projects/" if bWantSlash is true.
|
|
|
|
|
||||||||||||
|
This method returns a string pointer to the file's extension--not including the dot--or to an empty string if no dot is present.
|
|
|
|
|
|
This method returns a string pointer to the file's name--including the extension--or to an empty string if no identifiable file name is present. For example, if the file name is
|
|
|
This method returns a string pointer to the file's full path, or to an empty string.
|
|
|
|
2006.01.09-16:37