-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFCB.h
More file actions
35 lines (30 loc) · 765 Bytes
/
FCB.h
File metadata and controls
35 lines (30 loc) · 765 Bytes
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
/** @file FCB.h
*
* File Control Block structure
*
* @author Copyright Aniesh Chawla, Sept 2006
**/
#ifndef FCB_H
#define FCB_H
#include "includes.h"
/// The type attribute of the FCB is a file.
#define FILE_TYPE (0)
/// The type attribute of the FCB is a directory.
#define DIR_TYPE (1)
/** An FCB structure contains the file attributes.
*
* The FCB in our implementation must be 16 bytes in size, so that
* MIN_BLOCK_SIZE = MAX_FILE_NAME + 16
*/
struct FCB
{
/// Size of the file in bytes (might be left unused for directories).
int size;
/// FILE_TYPE or DIR_TYPE.
int type;
/// The file/directory creation time.
time_t created;
/// The starting block of the file or directory (or FAT_END).
int start_block;
};
#endif