file_to_str#

file_to_str(uri: str, fs: Optional[FileSystem] = None) str[source]#

Load contents of text file into a string.

Parameters
  • uri (str) – URI of file

  • fs (Optional[FileSystem]) – if supplied, use fs instead of automatically chosen FileSystem

Returns

contents of text file

Raises

NotReadableError if URI cannot be read

Return type

str