emmafs/inode.h
Emma Nora Theuer caf7b99f2d Initial Commit
2024-10-08 23:01:29 +02:00

43 lines
731 B
C

#ifndef INODE_H_
#define INODE_H_
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#include "util.h"
typedef struct Inode Inode;
typedef struct tm tm;
// Global Variables
time_t current_time;
// Structs
struct tm *local_time;
struct Inode {
// file information
char name[64];
uint32_t size;
// ownership and permissions
uint16_t permissions;
uint16_t owner;
uint16_t group;
// timestamps
tm created;
tm last_modified;
// fs attributes
uint32_t index;
uint16_t block_count;
block* data_block;
};
tm* get_local_time();
Inode* create_inode(char name[64], uint16_t owner, uint16_t group, block* data_block);
Inode* find_inode(char name[]);
#endif // INODE_H_