|
| | MountpointFsDirectory (intrusive_ref_ptr< FilesystemBase > parent, FastMutex &mutex, map< StringPart, int > &dirs, bool root, int currentInode, int parentInode) |
| |
| virtual int | getdents (void *dp, int len) |
| |
| | DirectoryBase (intrusive_ref_ptr< FilesystemBase > parent) |
| |
| virtual ssize_t | write (const void *data, size_t len) |
| |
| virtual ssize_t | read (void *data, size_t len) |
| |
| virtual off_t | lseek (off_t pos, int whence) |
| |
| virtual int | fstat (struct stat *pstat) const |
| |
| | FileBase (intrusive_ref_ptr< FilesystemBase > parent) |
| |
| virtual int | isatty () const |
| |
| virtual int | fcntl (int cmd, int opt) |
| |
| virtual int | ioctl (int cmd, void *arg) |
| |
const intrusive_ref_ptr
< FilesystemBase > | getParent () const |
| |
| virtual | ~FileBase () |
| |
|
| | IntrusiveRefCounted () |
| |
| | IntrusiveRefCounted (const IntrusiveRefCounted &) |
| |
| IntrusiveRefCounted & | operator= (const IntrusiveRefCounted &) |
| |
| static int | addEntry (char **pos, char *end, int ino, char type, const StringPart &n) |
| |
| static int | addDefaultEntries (char **pos, int thisIno, int upIno) |
| |
| static int | addTerminatingEntry (char **pos, char *end) |
| |
| static const int | direntHeaderSizeNoPadding =offsetof(struct dirent,d_name) |
| |
| static const int | direntHeaderSize =(direntHeaderSizeNoPadding+3+3)/4*4 |
| |
|
static const int | minimumBufferSize =3*direntHeaderSize |
| | Minimum buffer accepted by getdents, two for . and .., plus terminating.
|
| |
Directory class for MountpointFs
- Parameters
-
| parent | parent filesystem |
| mutex | mutex to lock when accessing the file map |
| dirs | file map |
| root | true if we're listing the root directory |
| currentInode | inode of the directory we're listing |
| parentInode | inode of the parent directory |
| int miosix::MountpointFsDirectory::getdents |
( |
void * |
dp, |
|
|
int |
len |
|
) |
| |
|
virtual |
Also directories can be opened as files. In this case, this system call allows to retrieve directory entries.
- Parameters
-
| dp | pointer to a memory buffer where one or more struct dirent will be placed. dp must be four words aligned. |
| len | memory buffer size. |
- Returns
- the number of bytes read on success, or a negative number on failure.
Reimplemented from miosix::FileBase.
The documentation for this class was generated from the following file: