If the file is already opened with LOCK READ WRITE (from elsewhere in your code or even in another process) then you will not be able to open that file.
However, if you have the PB file handle, you can test the file mode (APPEND, etc) with FILEATTR(), but FILEATTR() cannot determine the lock mode.
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Announcement
Collapse
No announcement yet.
Reading an open file (When opened for append)
Collapse
X
-
Reading an open file (When opened for append)
If I have a program that MAY or may not be opened for append (I won't know), is there a way to safely detect it?
I mean I could do a function and test for it but I want to read the contents of a file that is opene append lock read write
Can it be done? I'm getting weird errors trying it now, I know the file exists, I test for existence, but if the file is opne I get an error 53 (not found)..
Scott
------------------
Scott
mailto:[email protected][email protected]</A>Tags: None
Leave a comment: