Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - faccess() return the access mode of a file stream http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 faccess()           Return the access mode of a file stream
------------------------------------------------------------------------------
 Declaration
   fileio.hdr

 Syntax
   func int faccess extern
   param file fStream

 Arguments
   fStream is the file stream to manipulate.

 Return
   A integer representing the file access mode.

 Description
   This function returns the access mode of an opened buffered file stream.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_faccess
   vardef
      file fTemp
   enddef
   if fopen( fTemp, "c:\autoexec.bat", F_READ, F_TEXT )   // open file as text
      ? faccess( fTemp )                                  // print 4 (F_TEXT)
      fclose( fTemp )                                     // close file
   endif
   if fopen( fTemp, "c:\autoexec.bat", F_READ, F_BINARY ) // open file as text
      ? faccess( fTemp )                                  // print 8 (F_BINARY)
      fclose( fTemp )                                     // close file
   endif
   endproc

   proc main
   Test_faccess()
   endproc

See Also: fopen()

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