Filler Method

Fills the buffer with information about a directory entry.

Syntax

ANSI (Cross Platform)
int Filler(int64 lFillerContext, const char* lpszName, int64 lIno, int iMode, int iUid, int iGid, int iLinkCount, int64 lSize, int64 lATime, int64 lMTime, int64 lCTime);

Unicode (Windows)
INT Filler(LONG64 lFillerContext, LPCWSTR lpszName, LONG64 lIno, INT iMode, INT iUid, INT iGid, INT iLinkCount, LONG64 lSize, LONG64 lATime, LONG64 lMTime, LONG64 lCTime);
#define MID_FUSE_FILLER 5

CBFSFUSE_EXTERNAL int CBFSFUSE_CALL CBFSFUSE_FUSE_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

Use the Filler method from the ReadDir event handler to fill the buffer with the information about a file.

Call the method in a loop to add multiple entries.

The FillerContext parameter is passed to the ReadDir event handler and must be passed by the event handler to this method without modifications.

The Name parameter should contain the name of the directory entry.

The Ino parameter should be set to the ID of the file, which must be unique within a filesystem. Ino is optional on Windows and is ignored on Linux, where FUSE internally generates internal IDs.

The Mode parameter is a combination of bit flags.
Windows: Mode may include 0x4000 (S_IFDIR) to indicate that the entry is a directory, and must include either 0x80 (S_IWUSR) to indicate a file that can be read and written or 0x100 (S_IRUSR) to indicate a read-only file. Other flags are ignored.
Linux: Mode may include any appropriate file mode flags. See inode(7) for more information.

Windows: The Uid, Gid, and LinkCount parameters are not used.
Linux: The Uid and Gid parameters must be set to the owner's user ID and group ID respectively. LinkCount should be set to the number of hard links that the file has (which usually is 1).

Size must be set to the size of the file's data. For directories, the parameter should be set to 0.

ATime, MTime, CTime: Set respectively to the Access Time, Modification Time, and Creation Time values of the file or directory. All date/time parameters in the class are specified as a number of 100-nanosecond intervals since Jan 1, 1601 00:00:00 UTC (Windows) or as a number of seconds since Jan 1, 1970 00:00:00 UTC (Linux).

To convert Unix time to the format, suitable for this function, use the UnixTimeToFileTime method.

Windows: Any non-applicable time values can be set to 0.

The method returns 0 on success and an error code otherwise.

Note: This method cannot be called within events.

Error Handling (C++)

This method returns an Integer value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS FUSE 2020 C++ Edition - Version 20.0 [Build 8348]