Access Event

Fires when the OS needs to check file access permissions.

Syntax

ANSI (Cross Platform)
virtual int FireAccess(FUSEAccessEventParams *e);
typedef struct {
const char *Path;
int Mask;
int Result; int reserved; } FUSEAccessEventParams; Unicode (Windows) virtual INT FireAccess(FUSEAccessEventParams *e);
typedef struct {
LPCWSTR Path;
INT Mask;
INT Result; INT reserved; } FUSEAccessEventParams;
#define EID_FUSE_ACCESS 1

virtual INT CBFSFUSE_CALL FireAccess(LPWSTR &lpszPath, INT &iMask, INT &iResult);

Remarks

Windows:

This event fires when the OS needs to know whether the file or directory specified in Path can be deleted. For this, the Mask parameter is set to 2 (W_OK).

The application must return 0 in the Result parameter to indicate that deletion is permitted, or an error code otherwise.

Linux:

This event fires when the OS needs to check access permissions of the file or directory specified in Path. Specifically, the event fires when a process uses the access() system call.

The application must return 0 in the Result parameter to indicate that access, requested by the Mask parameter is permitted, or -EACCES to indicate that access is denied.

If the event cannot be handled in a "successful" manner for some reason (e.g., a resource isn't available, security checks failed, etc.), set it to a negative error code value (e.g. -ENOENT to indicate that the file does not exist) to report an appropriate error. Please refer to the Error Reporting and Handling topic for more information.

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