PatchworkOS  19e446b
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, vtype_t type)
 Emit function.
 
size_t pos
 The current position in the directory, can be used to skip entries.
 
void * data
 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 96 of file dentry.h.

Field Documentation

◆ emit

bool(* dir_ctx_t::emit) (dir_ctx_t *ctx, const char *name, vtype_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 vnode number of the entry.
typeThe vnode type of the entry.
Returns
true to continue iterating, false to stop.

Definition at line 111 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 112 of file dentry.h.

◆ data

void* dir_ctx_t::data

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

Definition at line 113 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 114 of file dentry.h.


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