[APE Index] [APE Hierarchy] [Headers]
shared file access between different processes. More...
#include <file.h>
Inherits: File
Locked files are presumed to be shared between different processes. File locks are used to protect file access and specifically defined operations which must occur exclusivily by a single process, such as for logical record locks in a database. Record locking is assumed to be a blocking operation.
[public]
Open an existing and named data file that may be shared by multiple processes. Throw an exception if the file doesn't exist or cannot be accessed.
access | access mode (read, write, or rdwr) to use. |
fname | path name of disk file to open. |
[public]
Duplicate an existing locked file's descriptor, but do not duplicate any outstanding locks.
f | reference to another LockedFile. |
[public]
Release the locked file and any locks held by this object.
[public]
Recieve a lock from the end of the current file to inf and when successful write the specified data to the end. Upon completion, release the file lock.
buf | pointer to data to write to the file. |
len | number of bytes to write. |
[public]
Request a lock for a portion of the datafile and then read the exclusivily locked portion of the file into memory.
pos | offset to portion of file to read. |
buf | pointer to memory to read data into. |
len | number of bytes to read. |
[public]
Copy a presumably modified memory block back to a locked portion of a file as retrieved from a previous request, and then clear the file lock so that another process may now access that region. No check is made to assure the Update actually matches a previous Request.
pos | offset to portion of file to write. |
buf | pointer to memory to write data from. |
len | number of bytes to write. |
[public]
Release a lock held from a request without modifying any data in the file so that another process may now access the locked region. No check is made to assure the Clear actually matches an existing Request.
pos | offset to portion of file that was locked. |
len | number of bytes originally requested. |
| Kdoc |