Method Fuse.Operations()->readdir()
classFuse.Operations
- Method
readdir
intreaddir(stringpath,function(string,int|void,Stdio.Stat|void:int)callback,int|voidoff,mixed|voidopendir_handle)- Description
Get directory contents.
- Parameter
path Path to the directory.
- Parameter
callback Filler callback. Call the callback once per entry in the directory with the filename as the first argument. The optional second argument is the next value for
off. A Stdio.Stat object for the entry may optionally be provided with the third argument. Returns1on failure (typically due to the buffer being full), at which time readdir() should return0. The kernel will then call readdir() again with the latest reportedoff.- Parameter
off Directory offset to start at. The first call after opendir() has a value of
0. Later calls have the value from the last call ofcallback.- Parameter
opendir_handle The value that was returned from opendir().
- Note
Do not forget to add entries for
"."end"..".- Note
This function is required.
- Returns
errno or
0. Returning0after a failed call ofcallbackindicates that there are entries left. Otherwise returning0indicates that all entries have been registered.