public interface DirFiller
The DirFiller will be used during
readdir requests
and needs to be invoked by file system implementations once for every child of the read dir.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int"Plus" mode: all file attributes are valid. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidConvenienve wrapper forfill(String, Consumer, long, int), just filling in the name, ignoring stats.default voidConvenience wrapper forfill(String, Consumer, long, int), ignoring the offset parameter.intFunction to add an entry in a readdir() operation
-
Field Details
-
FUSE_FILL_DIR_PLUS
static final int FUSE_FILL_DIR_PLUS"Plus" mode: all file attributes are valid.The attributes are used by the kernel to prefill the inode cache during a readdir.
It is okay to set FUSE_FILL_DIR_PLUS if
FUSE_READDIR_PLUSis not set and vice versa.- See Also:
-
-
Method Details
-
fill
Function to add an entry in a readdir() operationThe off parameter can be any non-zero value that enables the filesystem to identify the current point in the directory stream. It does not need to be the actual physical position. A value of zero is reserved to indicate that seeking in directories is not supported.
- Parameters:
name- the file name of the directory entrystat- file attributes, can be NULLoffset- offset of the next entry or zero when ignoring the offset parameterflags- fill flags, set toFUSE_FILL_DIR_PLUSto cache stats- Returns:
- 1 if buffer is full or an error occured, zero otherwise
- See Also:
-
fill
Convenience wrapper forfill(String, Consumer, long, int), ignoring the offset parameter.- Parameters:
name- The file namestat- A method to pre-fill the stats of this node- Throws:
IOException- Iffuse_fill_dir_treturns 1, which indicates an error.
-
fill
Convenienve wrapper forfill(String, Consumer, long, int), just filling in the name, ignoring stats.- Parameters:
name- The file name- Throws:
IOException- Iffuse_fill_dir_treturns 1, which indicates an error.
-