Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

IS_FNAME( cFname [, lWild_ok ] )

Purpose

Verify that a string is a valid DOS filename.

Arguments

     cFname -- file name to check

     lWild_ok -- if passed and .T., allow '?' and '*'; else don't allow
                     wildcards

Setup

None. Does not accept path/directory names.

Example

     ? IS_FNAME( "AmIaFile" )

Returns

.T. if cFname is legal, else .F.

Side Effects

None.

Artful Calls

POP_MSG

Source File

AA_FNAME.PRG

Notes

DOS allows a space in a filename. IS_FNAME() does not, because such files
cannot be accessed from the DOS prompt.

DOS allows chars > 128 in a filename. These look weird, but they can be
accessed, so we allow them.

IS_FNAME() does not trim cFname. The caller must, because that's the
only way to ensure that the name given to DOS is the same as the one we
validate.

Disk and path names are not allowed by IS_FNAME(). DOS allows ".xxx" as a
DIR argument. IS_FNAME() doesn't.

Note that this function only checks if a filename is a valid DOS filename.
It does not check for the existence of the specified file.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson