Bindings for WinFSP version 1.4 and onward.
Winfspy consists of three important modules:
winfspy
: expose the WinFSP APIwinfspy.memfs
: a memory file system based on winfspywinfspy.tests.winfsp_tests
: a test suite for black box testingwinfspy.tests.winfstest
: a lighter test suite for black box testing
WinFSP version 1.4 or higher has to be installed separately.
Then install winfspy using pip:
$ pip install winfspy
Usage:
from winfspy import (
FileSystem,
BaseFileSystemOperations,
enable_debug_log,
FILE_ATTRIBUTE,
CREATE_FILE_CREATE_OPTIONS,
NTStatusObjectNameNotFound,
NTStatusDirectoryNotEmpty,
NTStatusNotADirectory,
NTStatusObjectNameCollision,
NTStatusAccessDenied,
NTStatusEndOfFile,
)
Usage:
# Run the memory fs as X: drive in verbose mode
$ python -m winfspy.memfs X: -v
# More information
$ python -m winfspy.memfs
This test suite integrates the external test suite of winfsp-tests.
Usage:
# Install winfspy with the test dependencies
$ pip install winfspy[test]
# Run the winfstest test suite on an existing X: drive
$ python winfspy.tests.winfsp_tests --file-system-path X:
# More information about pytest
$ python winfspy.tests.winfsp_tests -h
This test suite is taken from secfs.test.winfstest. It is basic yet useful to test common use cases.
Usage:
# Install winfspy with the test dependencies
$ pip install winfspy[test]
# Run the winfstest test suite on an existing X: drive
$ python winfspy.tests.winfstest --file-system-path X:
# More information about pytest
$ python winfspy.tests.winfstest -h