pub unsafe extern "C" fn es_mute_path(
client: *mut es_client_t,
path: *const c_char,
type_: es_mute_path_type_t,
) -> es_return_tmacos_12_0_0 only.Expand description
Suppress all events matching a path.
client: The es_client_t for which the path will be muted.path: The path to mute.type: Describes the type of thepathparameter.
Path-based muting applies to the real and potentially firmlinked path of a file as seen by
VFS, and as available from fcntl(2) F_GETPATH. No special provisions are made for files
with multiple (“hard”) links, or for symbolic links.
In particular, when using inverted target path muting to monitor a particular path for writing, you will need to check if the file(s) of interest are also reachable via additional hard links outside of the paths you are observing.
When using the path types ES_MUTE_PATH_TYPE_TARGET_PREFIX and
ES_MUTE_PATH_TYPE_TARGET_LITERAL not all events are supported. Furthermore the
interpretation of target path is contextual. For events with more than one target path (such
as es_event_exchangedata_t) the behavior depends on the
mute inversion state:
- Under normal muting the event is suppressed only if ALL paths are muted
- When target path muting is inverted the event is selected if ANY target path is muted
For example a rename will be suppressed if and only if both the source path and destination path are muted. Supported events are listed below. For each event the target path is defined as:
EXEC: The file being executedOPEN: The file being openedMMAP: The file being memory mappedRENAME: Both the source and destination path.SIGNAL: The path of the process being signalledUNLINK: The file being unlinkedCLOSE: The file being closedCREATE: The path to the file that will be created or replacedGET_TASK: The path of the process for which the task port is being retrievedLINK: Both the source and destination pathSETATTRLIST: The file for which the attributes are being setSETEXTATTR: The file for which the extended attributes are being setSETFLAGS: The file for which flags are being setSETMODE: The file for which the mode is being setSETOWNER: The file for which the owner is being setWRITE: The file being written toREADLINK: The symbolic link being resolvedTRUNCATE: The file being truncatedCHDIR: The new working directoryGETATTRLIST: The file for which the attribute list is being retrievedSTAT: The file for which the stat is being retrievedACCESS: The file for which access is being testedCHROOT: The file which will become the new rootUTIMES: The file for which times are being setCLONE: Both the source file and target pathFCNTL: The file under file controlGETEXTATTR: The file for which extended attributes are being retrievedLISTEXTATTR: The file for which extended attributes are being listedREADDIR: The directory for whose contents will be readDELETEEXTATTR: The file for which extended attributes will be deletedDUP: The file being duplicatedUIPC_BIND: The path to the unix socket that will be createdUIPC_CONNECT: The file that the unix socket being connected is bound toEXCHANGEDATA: The path of both file1 and file2SETACL: The file for which ACLs are being setPROC_CHECK: The path of the process against which access is being checkedSEARCHFS: The path of the volume which will be searchedPROC_SUSPEND_RESUME: The path of the process being suspended or resumedGET_TASK_NAME: The path of the process for which the task name port will be retrievedTRACE: The path of the process that will be attached toREMOTE_THREAD_CREATE: The path of the process in which the new thread is createdGET_TASK_READ: The path of the process for which the task read port will be retrievedGET_TASK_INSPECT: The path of the process for which the task inspect port will be retrievedCOPYFILE: The path to the source file and the path to either the new file to be created or the existing file to be overwritten