Rudiments
|
#include <file.h>
Inherits filedescriptor.
The file class provides methods for interacting with files and for discovering the properties associated with a file such as permissions, ownership, size, etc.
Many of the static methods are just provided for convenience. Use them if you need to get a a single property or perform a single operation.
If you need to get multiple properties or perform multiple operations, create an instance of the class, call open(), then use the non-static methods.
file::file | ( | ) |
Creates an instance of the file class.
|
virtual |
Deletes this instance of the file class.
Advises the kernel that you are going to access the region of the currently open file begining at byte "start", for "len" bytes, normally so the kernel can undo any previously applied optimizations.
Returns true on success and false on failure.
On operating systems don't support this method, it returns true but don't actually do anything.
Advises the kernel that you are going to access the region of the currently open file begining at byte "start", for "len" bytes, only one time so the kernel can perform some optimizations.
Returns true on success and false on failure.
On operating systems don't support this method, it returns true but don't actually do anything.
Advises the kernel that you are going to access the region of the currently open file begining at byte "start", for "len" bytes, randomly so the kernel can perform some optimizations.
Returns true on success and false on failure.
On operating systems don't support this method, it returns true but don't actually do anything.
Advises the kernel that you are going to access the region of the currently open file begining at byte "start", for "len" bytes, sequentially so the kernel can perform some optimizations.
Returns true on success and false on failure.
On operating systems don't support this method, it returns true but don't actually do anything.
Advises the kernel that you are going to access the region of the currently open file begining at byte "start", for "len" bytes, in the near future so the kernel can perform some optimizations.
Returns true on success and false on failure.
On operating systems don't support this method, it returns true but don't actually do anything.
Advises the kernel that you are not going to access the region of the currently open file begining at byte "start", for "len" bytes, in the near future so the kernel can perform some optimizations.
Returns true on success and false on failure.
On operating systems don't support this method, it returns true but don't actually do anything.
|
static |
Changes the user and/or group that owns the file. Returns true on success and false on failure.
Changes the user and/or group that owns the file. Returns true on success and false on failure.
Changes the user and/or group that owns the file. Returns true on success and false on failure.
Changes the user that owns the file. Returns true on success and false on failure.
|
virtual |
Checks to see if the entire file can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if "len" bytes of the file starting at the current position in the file can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if "len" bytes of the file starting at the current position in the file plus "start" bytes can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if "len" bytes of the file starting at the end of the file can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if "len" bytes of the file starting at the end of the file plus "start" bytes can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if "len" bytes of the file starting at position "start" (relative to the beginning of the file) can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if the remainder of the file starting at position "start" (relative to the beginning of the file) can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if the remainder of the file starting at the current position can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if the remainder of the file starting at the current position plus "start" bytes can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if the remainder of the file starting at the end can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
|
virtual |
Checks to see if the remainder of the file starting at the end plus "start" bytes can be locked or not using the specified lock "type" (F_RDLCK or F_WRLCK) but does not actually attempt to lock the file. Returns true if the lock can be established immediately or false otherwise.
If the lock cannot be established then the "conf" parameters will be populated with the details about a conflicting lock which would prevent the file from being locked. "conftype" will contain the type of the lock (F_RDLCK or F_WRLCK) "confwhence" will contain the offset type of the lock (SEEK_SET, SEEK_CUR or SEEK_END), "confstart" will contain the starting offset for the lock and "conflen" will contain the number of bytes that are locked.
Creates the file "name" with permissions "perms". If the file already exists, it will be truncated. Returns true on success and false on failure.
Note that if "perms" is 0 then the method will fail.
Equivalent to calling: open(name,O_CREAT|O_WRONLY|O_TRUNC|O_BINARY,perms)
Creates a fifo called "filename" with permissions "perms". Returns true on success and false on failure.
Create a file named "name" with permissions "perms". If the file already exists, it will be truncated. Returns true on success and false on failure.
Creates a hard link between "oldpath" and "newpath". Returns true on success and false on failure.
Creates a symbolic link between "oldpath" and "newpath". Returns true on success and false on failure.
Creates a (presumably) temporary file using "templatefilename" as a template. The last 6 characters of "templatefilename" must be XXXXXX and "templatefilename" will be modified to contain the name of the file that was actually created.
Opens and returns the file descriptor handle of the file on success and -1 on failure.
Creates a temporary file using "templatefilename" as a template. The last 6 characters of "templatefilename" must be XXXXXX and "templatefilename" will be modified to contain the name of the file that was actually created.
Sets the permissions of the file to "perms". If permissions cannot be set then the file is removed and the call fails.
Opens and returns the file descriptor handle of the file on success and -1 on failure.
Returns true if the file exists and false otherwise.
Generates a key based on "filename" and the least signifigant 8 bits of id (which must be non-zero) suitable for use with semaphores, shared memory segments and message queues.
Returns the non-directory portion of "filename". This method allocates a buffer internally and returns it. The calling program must deallocate the buffer.
Returns the non-directory portion of "filename", truncating "ext". This method allocates a buffer internally and returns it. The calling program must deallocate the buffer.
|
virtual |
Returns the number of blocks allocated for the file or -1 for systems don't support this.
|
virtual |
Returns the blocksize to use for most efficient I/O with the file or -1 for systems don't support this.
Returns true if any of the changeOwner() methods are allowed on "filename" and false otherwise.
Returns true if any of the changeOwner methods are allowed on "filename" and false otherwise.
Allocates a string large enough to accommodate the contents of the currently opened file, reads the contents of the file into the string and returns the string. The string must be freed by the calling program.
Note: The contents returned by this method are as-is. No end-of-line translation is performed.
If the file contains no data, then an empty string is returned. If an error occurs then a NULL is returned.
Allocates "buffer" large enough to accommodate the contents of the currently opened file, reads the contents of the file into "buffer" and sets "buffersize" to the size of the buffer. "buffer" must be freed by the calling program.
Note: The contents returned by this method are as-is. No end-of-line translation is performed.
Returns the number of bytes copied into "buffer" or -1 on error.
Reads the contents of the currently open file into "buffer" of size "buffersize". If the file is larger than "buffersize" then only "buffersize" bytes of the file will be read into "buffer".
Note: The contents returned by this method are as-is. No end-of-line translation is performed.
Returns the number of bytes copied into "buffer" or -1 on error.
Allocates a string large enough to accommodate the contents of the file "name" , reads the contents of the file into the string, terminates it with a NULL and returns the string. The string must be freed by the calling program.
Note: The contents returned by this method are as-is. No end-of-line translation is performed.
If the file contains no data, then an empty string is returned. If an error occurs then a NULL is returned.
|
virtual |
Allocates "buffer" large enough to accommodate the contents of the file "name", reads the contents of the file into "buffer" and sets "buffersize" to the size of the buffer. "buffer" must be freed by the calling program.
Note: The contents returned by this method are as-is. No end-of-line translation is performed.
Returns the number of bytes copied into "buffer" or -1 on error.
Reads the contents of the file "name" into "buffer" of size "buffersize". If the file is larger than "buffersize" then only "buffersize" bytes of the file will be read into "buffer".
Note: The contents returned by this method are as-is. No end-of-line translation is performed.
Returns the number of bytes copied into "buffer" or -1 on error.
Refreshes the current file properties as returned by getSize(), getPermissions(), etc.
Returns true on success and false on failure.
Returns the directory portion of "filename". This method allocates a buffer internally and returns it. The calling program must deallocate the buffer.
Translates the basename of "filename" to an 8.3 format, performing substitutions in the same way that Windows does. This method allocates a buffer internally and returns it. The calling program must deallocate the buffer.
Returns the portion of "filename" after the last dot, including the dot, or an empty string if the filename contains no dot. The output should be suitable to be passed in as the "ext" parameter when calling basename().
|
virtual |
Returns the base inode of the file.
Returns a pointer to the file stats structure used internally. (struct stat * on unix)
Returns the time of last change of the file.
Change time IS affected by changing file permissions, ownership or creating links.
Sets "ctime" to the last change time of "filename". Returns true on success and false on failure.
Change time IS affected by changing file permissions, ownership or creating links.
Returns the time of last modification of the file.
Modification time IS NOT affected by changing file permissions, ownership or creating links.
|
static |
Populates "matches" with the set of files whos names match any of the patterns provided in the NULL-terminated array "pattern".
Storage for the strings appended to "matches" is allocated internally and must be deleted by the calling program.
Returns true on success or false on failure.
Note that on failure, "matches" may be partially populated.
|
static |
Populates "matches" with the set of files whos names match "pattern".
Storage for the strings appended to "matches" is allocated internally and must be deleted by the calling program.
Returns true on success or false on failure.
Note that on failure, "matches" may be partially populated.
|
static |
Populates "matches" with the set of files whos names match any of the patterns provided in the linked list "pattern".
Storage for the strings appended to "matches" is allocated internally and must be deleted by the calling program.
Returns true on success or false on failure.
Note that on failure, "matches" may be partially populated.
|
static |
Populates "matches" with the set of files whos names match any of the patterns provided in the linked list "pattern".
Storage for the strings appended to "matches" is allocated internally and must be deleted by the calling program.
Returns true on success or false on failure.
Note that on failure, "matches" may be partially populated.
|
virtual |
Returns the maximum number of links that can be created to "filename".
Returns the maximum number of links that can be created to "filename".
|
virtual |
Returns the number of hard links to the file.
|
virtual |
Returns the group id of the file's owner.
|
virtual |
Returns the user id of the file's owner.
|
virtual |
Returns the permissions settings for the file.
|
virtual |
Returns the number of bytes in the file.
Checks to see if "filename" exists, is readable, is writeable and/or is executable by the user, based on the value of "mode". Mode should be an or'ed combination of F_OK (exists), R_OK (readable), W_OK (writable) and X_OK (executable) flags.
Returns true if the file meets the conditions set by the mode and false otherwise.
|
virtual |
Returns 1 if the file is a block device, 0 if it's not or -1 on error.
|
virtual |
Returns 1 if the file is a character device, 0 if it's not or -1 on error.
|
virtual |
Returns 1 if the file is a directory, 0 if it's not or -1 on error.
Returns true if "filename" is executable by the user or false otherwise.
|
virtual |
Returns 1 if the file is a fifo, 0 if it's not or -1 on error.
Returns true if "filename" is readable by the user or false otherwise.
|
virtual |
Returns 1 if the file is a regular file, 0 if it's not or -1 on error.
|
virtual |
Returns 1 if the file is a socket, 0 if it's not or -1 on error.
|
virtual |
Returns 1 if the file is a symbolic link, 0 if it's not or -1 on error.
Returns true if "filename" is writeable by the user or false otherwise.
Attempts to lock the entire file using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Return true on success or false otherwise.
Attempts to lock "len" bytes of the file starting at the current position in the file using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock "len" bytes of the file starting at the current position in the file plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock "len" bytes of the file starting at the end of the file using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock "len" bytes of the file starting at the end of the file plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock "len" bytes of the file starting at position "start" (relative to the beginning of the file) using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock the remainder of the file starting at position "start" (relative to the beginning of the file) using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock the remainder of the file starting at the current position using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock the remainder of the file starting at the current position plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock the remainder of the file starting at the end using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Attempts to lock the remainder of the file starting at the end plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK) and blocks until the lock can be established. Returns true on success or false otherwise.
Opens the file "name" using "flags".
"flags" may contain one more more of the following flags, or'ed together:
O_RDONLY - Open the file in read-only mode.
O_WRONLY - Open the file in write-only mode.
O_RDWR - Open the file in write-only mode.
O_APPEND - All writes will occur at end of the file. (NOTE: This flag conflicts with buffering. Don't use when also using buffering.)
O_TRUNC - Truncate the file. Requires O_WRONLY or O_RDWR.
Many platforms support additional, platform-specific flags.
Note that since this method doesn't allow file permissions to be set, attempts to open the file with the O_CREAT flag (which creates the file if it doesn't exist) will fail.
Returns true on success and false on failure.
Opens the file "name" using "flags".
"flags" may contain one more more of the following flags, or'ed together:
O_RDONLY - Open the file in read-only mode.
O_WRONLY - Open the file in write-only mode.
O_RDWR - Open the file in write-only mode.
O_APPEND - All writes will occur at end of the file. (NOTE: This flag conflicts with buffering. Don't use when also using buffering.)
O_TRUNC - Truncate the file. Requires O_WRONLY or O_RDWR.
O_CREAT - Creates the file if it doesn't exist. See O_EXCL.
O_EXCL - Requires O_CREAT. Causes O_CREAT to fail if the file already exists. Without O_EXCL, O_CREAT will succeed, and just open the file, if the file already exists.
Many platforms support additional, platform-specific flags.
If "flags" contains O_CREAT and the file doesn't already exist, then it will be created with permissions "perms". Note that if "perms" is 0 then the method will fail.
Returns true on success and false on failure.
Removes file "filename". Returns true on success and false on failure. (Will not remove a directory).
Renames "oldpath" to "newpath". Returns true on success and false on failure.
Reserves space on the storage medium such that a write to the region starting at "start" and continuing for "len" bytes will not fail due to lack of storage space.
Returns true if the region can be reserved and false otherwise.
Returns the pathname of the file that the symbolic link "filename" points to. Returns NULL on failure.
Note that this method allocates a buffer for the path internally and returns it. The calling program must deallocate this buffer.
If "getcurrentpropertiesonopen" is true, then open() and create() methods will call getCurrentProperties() internally so other methods of this class such as getSize() will return valid data about the file immediately.
If "getcurrentpropertiesonopen" is false, then open() and create() methods will not call getCurrentProperties() internally. This offers a small performance improvement which can become significant if you intend to open lots of files but don't need to know the size or any other properties about them. If this method is called with false and a method such as getSize() is called afterwards, then it will call getCurrentProperties() internally.
Defaults to true.
Overrides the last access and modification times of the file, setting them both to the current system time. Returns true on success and false on failure.
|
static |
Overrides the last access and modification times of the file, setting them to "lastaccesstime" and "lastmodtime" respectively. Returns true on success and false on failure.
Overrides the last access time of the file, setting it to "lastaccesstime". Returns true on success and false on failure.
Overrides the last modification time of the file, setting it to "lastaccesstime". Returns true on success and false on failure.
Sets the permissions of the file to "perms". Returns true on success and false on failure.
Sets the permissions of the file to "perms". Returns true on success and false on failure.
On most filesystems, changes to files are often cached in system ram, this methods causes those changes (including changes to file metadata such as last-access and last-modifiction times) to be immediately copied to the storage medium that the file resides on.
Returns true on success and false on failure.
Note that if a hard disk has on-board write cache enabled, this method only assures that the changes has been copied into the disk's write cache, not necessarily to the disk itself.
On most filesystems, changes to files are often cached in system ram, this methods causes those changes to be immediately copied to the storage medium that the file resides on.
This method differs from sync() in that it does not wait until file metadata such as last-access or last-modification times to be written before it returns.
Returns true on success and false on failure.
Note that if a hard disk has on-board write cache enabled, this method only assures that the changes has been copied into the disk's write cache, not necessarily to the disk itself.
Truncates all data in the file, resulting in a file of zero bytes. Returns true on success and false on failure.
Truncates the file. Returns true on success and false on failure.
Truncates the file after the first "size" bytes. Returns true on success and false on failure.
Truncates all data beyond the first "size" bytes, resulting in a file of "size" bytes. Returns true on success and false on failure.
Attempts to lock the entire file using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock "len" bytes of the file starting at the current position in the file using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock "len" bytes of the file starting at the current position in the file plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock "len" bytes of the file starting at the end of the file using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock "len" bytes of the file starting at the the end of the file plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock "len" bytes of the file starting at position "start" (relative to the beginning of the file) using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock the remainder of the file starting at position "start" (relative to the beginning of the file) using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock the remainder of the file starting at the current position using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock the remainder of the file starting at the current position plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock the remainder of the file starting at the end using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to lock the remainder of the file starting at the end plus "start" bytes using the specified lock "type" (F_RDLCK or F_WRLCK). Returns true if the lock can be established immediately or false otherwise.
Attempts to release a previosly established lock and returns true on success or false otherwise.
Attempts to release a previosly established lock of "len" bytes of the file starting at the current position in the file. Returns true on success or false otherwise.
Attempts to release a previosly established lock of "len" bytes of the file starting at the current position in the file plus "start" bytes. Returns true on success or false otherwise.
Attempts to release a previosly established lock of "len" bytes of the file starting at the end of the file. Returns true on success or false otherwise.
Attempts to release a previosly established lock of "len" bytes of the file starting at the end of the file plus "start" bytes. Returns true on success or false otherwise.
Attempts to release a previosly established lock of "len" bytes of the file starting at position "start" (relative to the beginning of the file). Returns true on success or false otherwise.
Attempts to release a previosly established lock on the remainder of the file, starting at position "start" (relative to the begining of the file). Returns true on success or false otherwise.
Attempts to release a previosly established lock on the remainder of the file, starting at the current position. Returns true on success or false otherwise.
Attempts to release a previosly established lock on the remainder of the file, starting at the current position plus "start" bytes. Returns true on success or false otherwise.
Attempts to release a previosly established lock on the remainder of the file, starting at the end. Returns true on success or false otherwise.