Common File Operations

Create To establish a new file. This involves allocating and filling a file header, creating an optional directory entry for the file, and usually securing an initial allocation of disk blocks to hold the first portion of the file. When "creation" is complete, this does not imply that all of the file contents are written to the file. On the contrary, the file is usually still open for write access.

Open To establish a context for reading or modifying an existing file. A file may be opened to be read, to be read and written to, or to be appended. Files-11 does not fully support write-only files.

Read To copy data from the file into memory.

Write To modify the contents of the file. This may mean appending data onto the end of the file, or it may mean overwriting existing contents.

Extend To add additional empty blocks onto the end of the file—usually done in anticipation of appending data to the file.

Truncate To deallocate some (or all) of the file storage space without deleting the file. Truncation occurs from the end of the file, so any data left will be the first portion of the previous contents.

Delete To remove a file. The delete process deallocates the header and the directory entry (if any) and frees the disk blocks allocated to the file. This generally does not involve erasing the actual file contents, but only removing the pointers to the data. Generally, the data continue to exist until overwritten by a new file.



Getting Started with OpenVMS(c) A Guide for New Users
Getting Started with OpenVMS: A Guide for New Users (HP Technologies)
ISBN: 1555582796
EAN: 2147483647
Year: 2005
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net