-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenFile.h
More file actions
47 lines (42 loc) · 1.04 KB
/
OpenFile.h
File metadata and controls
47 lines (42 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/** @file OpenFile.h
*
* Open File structure
*
* @author Copyright Aniesh Chawla, Sept 2006
**/
#ifndef OPENFILE_H
#define OPENFILE_H
#include "includes.h"
#include "Volume.h"
#include "FileName.h"
/** The OpenFile object is an entry in the open file table kept by the FS.
*
*/
class OpenFile
{
public:
/// Number of open files, count = 0 if entry is free.
int count;
/// The Volume object for this file.
Volume* volume;
/// The path to this file.
char *path;
/// The name of this file.
FileName name;
/// The size of this file.
int size;
/// The current read/write position of this file.
int pos;
/// The starting block on Disk for this file.
int start_block;
/// The current block for the read/write position.
int current_block;
/// The block offset for the read/write position.
int current_block_pos;
/// True if a write operation was performed on this file, or attributes have changed.
bool updated;
public:
OpenFile();
~OpenFile();
};
#endif