class_docstr: Text datasource, for reading and writing text files.
code: def __init__(
      self,
      paths: List[str],
      *,
      drop_empty_lines: bool = False,
      encoding: str = "utf-8",
      **file_based_datasource_kwargs,
  ):
      super().__init__(paths, **file_based_datasource_kwargs)
  
      self.drop_empty_lines = drop_empty_lines
      self.encoding = encoding
  
file_path: ray/python/ray/data/datasource/text_datasource.py
imports: from typing import TYPE_CHECKING, Iterator, List
  from ray.data._internal.delegating_block_builder import DelegatingBlockBuilder
  from ray.data.block import Block
  from ray.data.datasource.file_based_datasource import FileBasedDatasource
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 1 to create a new TextDatasource object from inherited base classes: FileBasedDatasource with example: obj = TextDatasource(paths)