maat.FileSystem class

Fully emulated symbolic filesystem

❱   Methods

int new_fa(str filepath)

Create a new file accessor for a file. Returns an opaque unique handle for the created file accessor.

Parameters
filepath Path of the file for which to create a new accessor

FileAccessor get_fa_by_handle(int handle)

Return the file accessor corresponding to a given handle

Parameters
handle The handle identifying the file accessor to get. If invalid the method raises a runtime exception

delete_fa(int handle, bool weak=False)

Delete the file accessor corresponding to the given handle

Parameters
handle The handle identifying the file accessor to delete
weak If set to True and the engine restores a snapshot that was taken before the file accessor deletion,the file accessor will be restored as well. If set to False, the file accessor is deleted and never restored.

File get_file(str filepath, bool follow_symlink=True)

Get a symbolic file from the file system

Parameters
filepath The path of the file in the symbolic file system
follow_symlink If set to True, resolve symbolic links and return the linked file

str get_stdin_for_pid(int pid)

Return the path of the standard input file for a process given its PID

Parameters
pid The PID of the process