add lab answers
This commit is contained in:
19
labcodes_answer/lab8_result/user/libs/dir.h
Normal file
19
labcodes_answer/lab8_result/user/libs/dir.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef __USER_LIBS_DIR_H__
|
||||
#define __USER_LIBS_DIR_H__
|
||||
|
||||
#include <defs.h>
|
||||
#include <dirent.h>
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
struct dirent dirent;
|
||||
} DIR;
|
||||
|
||||
DIR *opendir(const char *path);
|
||||
struct dirent *readdir(DIR *dirp);
|
||||
void closedir(DIR *dirp);
|
||||
int chdir(const char *path);
|
||||
int getcwd(char *buffer, size_t len);
|
||||
|
||||
#endif /* !__USER_LIBS_DIR_H__ */
|
||||
|
||||
Reference in New Issue
Block a user