PatchworkOS  10941b4
A non-POSIX operating system.
Loading...
Searching...
No Matches
dir_ctx_t Struct Reference

Directory context used to iterate over directory entries. More...

#include <dentry.h>

Collaboration diagram for dir_ctx_t:

Data Fields

bool(* emit )(dir_ctx_t *ctx, const char *name, ino_t number, itype_t type)
 Emit function.
 
size_t pos
 The current position in the directory, can be used to skip entries.
 
voidprivate
 Private data that the filesystem can use to conveniently pass data.
 
size_t index
 An index that the filesystem can use for its own purposes.
 

Detailed Description

Directory context used to iterate over directory entries.

Definition at line 95 of file dentry.h.

Field Documentation

◆ emit

bool(* dir_ctx_t::emit) (dir_ctx_t *ctx, const char *name, ino_t number, itype_t type)

Emit function.

Should be called on all entries inside a directory while iterating over it, until this function returns false.

Will be implemented by the VFS not the filesystem.

Parameters
ctxThe directory context.
nameThe name of the entry.
numberThe inode number of the entry.
typeThe inode type of the entry.
Returns
true to continue iterating, false to stop.

Definition at line 110 of file dentry.h.

◆ pos

size_t dir_ctx_t::pos

The current position in the directory, can be used to skip entries.

Definition at line 111 of file dentry.h.

◆ private

void* dir_ctx_t::private

Private data that the filesystem can use to conveniently pass data.

Definition at line 112 of file dentry.h.

◆ index

size_t dir_ctx_t::index

An index that the filesystem can use for its own purposes.

Definition at line 113 of file dentry.h.


The documentation for this struct was generated from the following file: