haiku/headers/private/fs_shell/fssh_dirent.h
Ingo Weinhold a38a92c955 Beginnings of a new, better portable FS shell with Haiku FS interface.
Doesn't do anything ATM, but already provides the required system
interface (VFS, caches, POSIX functions).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-27 12:17:22 +00:00

43 lines
1.0 KiB
C

/*
** Distributed under the terms of the Haiku License.
*/
#ifndef _FSSH_DIRENT_H
#define _FSSH_DIRENT_H
#include "fssh_defs.h"
typedef struct fssh_dirent {
fssh_dev_t d_dev; /* device */
fssh_dev_t d_pdev; /* parent device (only for queries) */
fssh_ino_t d_ino; /* inode number */
fssh_ino_t d_pino; /* parent inode (only for queries) */
unsigned short d_reclen; /* length of this record, not the name */
char d_name[1]; /* name of the entry (null byte terminated) */
} fssh_dirent_t;
typedef struct {
int fd;
struct fssh_dirent ent;
} fssh_DIR;
#ifdef __cplusplus
extern "C" {
#endif
fssh_DIR *fssh_opendir(const char *dirname);
struct fssh_dirent *fssh_readdir(fssh_DIR *dir);
int fssh_readdir_r(fssh_DIR *dir, struct fssh_dirent *entry,
struct fssh_dirent **_result);
int fssh_closedir(fssh_DIR *dir);
void fssh_rewinddir(fssh_DIR *dir);
void fssh_seekdir(fssh_DIR *dir, long int loc);
long int fssh_telldir(fssh_DIR *);
#ifdef __cplusplus
}
#endif
#endif /* _FSSH_DIRENT_H */