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

ACCESS( cFilename[, lBool[, nMode ]] )

Purpose

Determine if the user can obtain nMode access to cFilename.

Arguments

     cFilename -- name of the file

     lBool -- if passed, whether to create the file; default .F.

     nMode -- if passed, file mode to use; default 2

Setup

None.

Example

     IF ACCESS( "myfile", .T., 2 )
        fd = FOPEN( "myfile", 2 )
        FWRITE( fd, "junk" )
        FCLOSE( fd )
     ENDIF

Returns

.T. if successful, else .F.

Side Effects

Optionally creates the file.

Artful Calls

VERIFY, POP_MSG, DELFILES

Source File

AA_ACCES.PRG

Notes

Access to the file is not provided, only attempted. Calculate nMode
by bitwise ORing bits of the nMode byte:

                                nMode        Bits

                                Value   0 1 2 3 4 5 6 7

     single-user: R/O             0
     single-user: W/O             1     +
     single-user: R/W             2       +
     (not used)                  (4)
     (reserved)                  (8)
     deny R/W access to others   16             +
     deny W access to others     32               +
     deny R access to others     48             + +
     allow R/W access by others  64                 +
     child process inherits     128                   +

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