ninjecto.plugins.filters.read

Filter to read the content of text files.

Functions

ninjecto.plugins.filters.read.filter_read(filename, encoding='utf-8', errors='strict')

Filter to read the content of text files.

Parameters
  • filename – Path object or string to the file to read from.
  • encoding (str) – The name of the encoding used to decode the content of the file.
  • errors (str) – Specifies how encoding and decoding errors are to be handled. Refer to Python’s open() function documentation.
Returns

The totality of the content of the file.

Return type

str