Fires when the OS needs to enumerate a file's named streams.
class CBFSEnumerateNamedStreamsEventParams(object): @property def file_name() -> str: ... @property def named_stream_found() -> bool: ... @named_stream_found.setter def named_stream_found(value) -> None: ... @property def stream_name() -> str: ... @stream_name.setter def stream_name(value) -> None: ... @property def stream_size() -> int: ... @stream_size.setter def stream_size(value) -> None: ... @property def stream_allocation_size() -> int: ... @stream_allocation_size.setter def stream_allocation_size(value) -> None: ... @property def handle_info() -> int: ... @property def file_context() -> int: ... @file_context.setter def file_context(value) -> None: ... @property def handle_context() -> int: ... @handle_context.setter def handle_context(value) -> None: ... @property def enumeration_context() -> int: ... @enumeration_context.setter def enumeration_context(value) -> None: ... @property def result_code() -> int: ... @result_code.setter def result_code(value) -> None: ... # In class CBFS: @property def on_enumerate_named_streams() -> Callable[[CBFSEnumerateNamedStreamsEventParams], None]: ... @on_enumerate_named_streams.setter def on_enumerate_named_streams(event_hook: Callable[[CBFSEnumerateNamedStreamsEventParams], None]) -> None: ...
This event fires when the OS needs to enumerate the named streams of the file specified by FileName (which will have been opened via on_open_file).
This event only needs to be handled if the use_alternate_data_streams property is enabled. To handle this event properly, applications must return information about each of the file's named streams. For each named stream, set StreamNameFound to True and supply the named stream's information using the following parameters:
- StreamName: Set to the name of the named stream, prefixed with : (e.g. :MyStreamName).
For more information about stream naming conventions, refer to Microsoft's Naming Conventions for Streams information.
- The length of the returned name must not exceed the value of the max_file_name_length property.
- StreamSize: Set the size, in bytes, of the named stream's data.
- StreamAllocationSize: Set to the number of bytes allocated locally for the named stream. This is typically a multiple of the ClusterSize.
If there are no more named streams present, set StreamNameFound to False and leave the above parameters unchanged. When the OS is finished with the named streams enumeration, the on_close_named_streams_enumeration event will fire.
The HandleInfo parameter carries a handle to an object with information about the file handle. While within the event handler, it can be used to call any of the following methods: get_handle_creator_process_id, get_handle_creator_process_name, get_handle_creator_thread_id, or get_handle_creator_token.
The FileContext, HandleContext, and EnumerationContext parameters are placeholders for application-defined data associated with the file, specific handle, and enumeration; respectively. Please refer to the Contexts topic for more information.
The ResultCode parameter will always be 0 when the event is fired. 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 non-zero value to report an appropriate error. Please refer to the Error Reporting and Handling topic for more information.