Functions

ID #1050

How to check presense of file on disk?

Short example:

OF_READ EQUATE(0000h)             ! Allow read
OF_WRITE EQUATE(0001h)            ! Allow write
OF_READWRITE EQUATE(0002h)        ! Allow read/write
OF_SHARE_DENY_NONE EQUATE(0040h)  ! Allow share/deny none
OF_SHARE_DENY_READ EQUATE(0030h)  ! Deny read all
OF_SHARE_DENY_WRITE EQUATE(0020h) ! Deny write all
MAP
  MODULE('Clarion RTL')
    Access(*CSTRING lpPathName,SIGNED iAccessMode),SIGNED,RAW,NAME('_access')
  END
END
MyFileName  CSTRING('myfile.dat')
  CODE
  IF Access(MyFileName, OF_READ) = 0
    ! File is on disk and available for read
  END

Tags: file access

Related entries:

Last update: 2007-07-17 10:13
Author: Aleksey Timkov
Revision: 1.0

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You can comment on this entry