Why is the python winfspy package broken

2 days ago 12
ARTICLE AD BOX

I am trying to use the package to make a demo system and I cannot get it to work. Here is my class:

class DenyFS(BaseFileSystemOperations): def create_file(self, file_name, create_options, file_attributes, granted_access, file_full_attributes, context): print(f"create_file called: {file_name}") return NTStatusAccessDenied

. Imports:

from winfspy import ( FileSystem, BaseFileSystemOperations, enable_debug_log, FILE_ATTRIBUTE, CREATE_FILE_CREATE_OPTIONS, NTStatusObjectNameNotFound, NTStatusDirectoryNotEmpty, NTStatusNotADirectory, NTStatusObjectNameCollision, NTStatusAccessDenied, NTStatusEndOfFile, )

I was hoping to get a folder which is empty and access denies me but it sadly didn't. I tried adding some files using the directory listing but it failed. Sadly, I cannot convince this thing to work. I tried doing this and it failed (did nothing):

ops_instance = DenyFS() fs = FileSystem(operations=ops_instance, mountpoint=mount_path)

I tried then fs.start to get this:

Unhandled exception Traceback (most recent call last): File "C:\Users\...\Lib\site-packages\winfspy\operations.py", line 20, in wrapper return fn(*args, **kwargs) File "C:\Users\...\Lib\site-packages\winfspy\operations.py", line 126, in ll_get_security_by_name fa, sd, sd_size = self.get_security_by_name(cooked_file_name) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ File "C:\Users\...\Lib\site-packages\winfspy\operations.py", line 155, in get_security_by_name raise NotImplementedError() NotImplementedError Traceback (most recent call last): File "c:\Users\teren\Docs and Files\github_repos\Python\filevault\testing123.py", line 56, in <module> fs.start() ~~~~~~~~^^ File "C:\Users\...\Lib\site-packages\winfspy\file_system.py", line 191, in start os.stat(self.mountpoint) ~~~~~~~^^^^^^^^^^^^^^^^^ OSError: [WinError 1117] The request could not be performed because of an I/O device error: 'C:\\users\\...\\demo'
Read Entire Article