List of all members.
Detailed Description
Definition at line 239 of file file.h.
Constructor & Destructor Documentation
Constructs a file object representing a file on the filesystem.
- Parameters:
-
name | Name of file. |
create_new | Whether to create a new file. |
- Exceptions:
-
Copy constructor.
- Parameters:
-
other | File object to copy. |
- Returns:
- A copy of the File object.
Destructor that automatically closes the underlying file if no other File objects are using it.
Member Function Documentation
Allocates a new page in the file.
- Returns:
- The new page.
Implements wiscdb::File.
Returns an iterator at the first page in the file.
- Returns:
- Iterator at first page of file.
Creates a new file.
- Parameters:
-
filename | Name of the file. |
- Exceptions:
-
Deletes a page from the file.
- Parameters:
-
page_number | Number of page to delete. |
Implements wiscdb::File.
Returns an iterator representing the page after the last page in the file. This iterator should not be dereferenced.
- Returns:
- Iterator representing page after the last page in the file.
Opens the file named fileName and returns the corresponding File object. It first checks if the file is already open. If so, then the new File object created uses the same input-output stream to read to or write fom that already open file. Reference count (open_counts_ static variable inside the File object) is incremented whenever an already open file is opened again. Otherwise the UNIX file is actually opened. The fileName and the stream associated with this File object are inserted into the open_streams_ map.
- Parameters:
-
filename | Name of the file. |
- Exceptions:
-
Assignment operator.
- Parameters:
-
rhs | File object to assign. |
- Returns:
- Newly assigned file object.
Reads an existing page from the file.
- Parameters:
-
page_number | Number of page to read. |
- Returns:
- The page.
- Exceptions:
-
Implements wiscdb::File.
Writes a page into the file at the given page number. No bounds checking is performed.
- Parameters:
-
page_number | Number of page whose contents to replace. |
new_page | Page to write. |
Implements wiscdb::File.
The documentation for this class was generated from the following file: