Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pintos_forked_resit
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
s2-alsaloumi
Pintos_forked_resit
Commits
2bc83565
Commit
2bc83565
authored
1 year ago
by
h2-addad
Browse files
Options
Downloads
Patches
Plain Diff
Update
parent
8ccb3291
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/filesys/directory.h
+30
-0
30 additions, 0 deletions
src/filesys/directory.h
with
30 additions
and
0 deletions
src/filesys/directory.h
0 → 100644
+
30
−
0
View file @
2bc83565
#ifndef FILESYS_DIRECTORY_H
#define FILESYS_DIRECTORY_H
#include
<stdbool.h>
#include
<stddef.h>
#include
"devices/block.h"
/* Maximum length of a file name component.
This is the traditional UNIX maximum length.
After directories are implemented, this maximum length may be
retained, but much longer full path names must be allowed. */
#define NAME_MAX 14
struct
inode
;
/* Opening and closing directories. */
bool
dir_create
(
block_sector_t
sector
,
size_t
entry_cnt
);
struct
dir
*
dir_open
(
struct
inode
*
);
struct
dir
*
dir_open_root
(
void
);
struct
dir
*
dir_reopen
(
struct
dir
*
);
void
dir_close
(
struct
dir
*
);
struct
inode
*
dir_get_inode
(
struct
dir
*
);
/* Reading and writing. */
bool
dir_lookup
(
const
struct
dir
*
,
const
char
*
name
,
struct
inode
**
);
bool
dir_add
(
struct
dir
*
,
const
char
*
name
,
block_sector_t
);
bool
dir_remove
(
struct
dir
*
,
const
char
*
name
);
bool
dir_readdir
(
struct
dir
*
,
char
name
[
NAME_MAX
+
1
]);
#endif
/* filesys/directory.h */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment