nvflare.fuel.utils.pipe.file_accessor module

class FileAccessor[source]

Bases: ABC

Abstract base class for file accessors.

This class provides an interface for accessing and manipulating files. Subclasses should implement the write() and read() methods to provide concrete implementations for writing and reading data from files.

abstract read(file_path: str) Any[source]

Reads the data located at the specified file_path.


file_path – location of the data to be read


The data object read from the file.

abstract write(data: Any, file_path: str) None[source]

Writes the specified data to file(s) in the specified path.

  • data – The data to be written.

  • file_path – The path where the data is to be written.