class_docstr: Simple KV API built on the underlying filesystem.
  
  This is a convenience wrapper around get_filesystem() and working with files.
  Slashes in the path are interpreted as directory delimiters.
class_docstr_tok: ["Simple","KV","API","built","on","the","underlying","filesystem",".","This","is","a","convenience","wrapper","around","get_filesystem","(",")","and","working","with","files",".","Slashes","in","the","path","are","interpreted","as","directory","delimiters","."]
docstr: List blobs and sub-dirs in the given path, if possible.
  
  Examples:
  
      >>> import ray
      >>> from ray._private import storage
      >>> ray.shutdown()
  
      Normal usage.
  
      >>> ray.init(storage="/tmp/storage/cluster_1/storage")
      RayContext(...)
      >>> client = storage.get_client("my_app")
      >>> client.put("path/foo.txt", b"bar")
      >>> client.list("path")
      [<FileInfo for '.../my_app/path/foo.txt': type=FileType.File, size=3>]
  
      Non-existent path.
  
      >>> client.list("does_not_exist")
      Traceback (most recent call last):
          ...
      FileNotFoundError: ... No such file or directory
  
      Not a directory.
  
      >>> client.list("path/foo.txt")
      Traceback (most recent call last):
          ...
      NotADirectoryError: ... Not a directory
  
  Args:
      path: Relative directory to list from.
  
  Returns:
      List of file-info objects for the directory contents.
  
  Raises:
      FileNotFoundError if the given path is not found.
      NotADirectoryError if the given path isn't a valid directory.
docstr_tok: ["List","blobs","and","sub-dirs","in","the","given","path",",","if","possible",".","Examples",":",">",">",">","import","ray",">",">",">","from","ray._private","import","storage",">",">",">","ray.shutdown","(",")","Normal","usage",".",">",">",">","ray.init","(","storage=","''","\/tmp\/storage\/cluster_1\/storage","''",")","RayContext","(","...",")",">",">",">","client","=","storage.get_client","(","``","my_app","''",")",">",">",">","client.put","(","``","path\/foo.txt","''",",","b","''","bar","''",")",">",">",">","client.list","(","``","path","''",")","[","<","FileInfo","for","'","...","\/my_app\/path\/foo.txt","'",":","type=FileType.File",",","size=3",">","]","Non-existent","path",".",">",">",">","client.list","(","``","does_not_exist","''",")","Traceback","(","most","recent","call","last",")",":","...","FileNotFoundError",":","...","No","such","file","or","directory","Not","a","directory",".",">",">",">","client.list","(","``","path\/foo.txt","''",")","Traceback","(","most","recent","call","last",")",":","...","NotADirectoryError",":","...","Not","a","directory","Args",":","path",":","Relative","directory","to","list","from",".","Returns",":","List","of","file-info","objects","for","the","directory","contents",".","Raises",":","FileNotFoundError","if","the","given","path","is","not","found",".","NotADirectoryError","if","the","given","path","is","n't","a","valid","directory","."]
code: def list(
      self,
      path: str,
  ) -> List["pyarrow.fs.FileInfo"]:
      """List blobs and sub-dirs in the given path, if possible.
  
      Examples:
  
          >>> import ray
          >>> from ray._private import storage
          >>> ray.shutdown()
  
          Normal usage.
  
          >>> ray.init(storage="/tmp/storage/cluster_1/storage")
          RayContext(...)
          >>> client = storage.get_client("my_app")
          >>> client.put("path/foo.txt", b"bar")
          >>> client.list("path")
          [<FileInfo for '.../my_app/path/foo.txt': type=FileType.File, size=3>]
  
          Non-existent path.
  
          >>> client.list("does_not_exist")
          Traceback (most recent call last):
              ...
          FileNotFoundError: ... No such file or directory
  
          Not a directory.
  
          >>> client.list("path/foo.txt")
          Traceback (most recent call last):
              ...
          NotADirectoryError: ... Not a directory
  
      Args:
          path: Relative directory to list from.
  
      Returns:
          List of file-info objects for the directory contents.
  
      Raises:
          FileNotFoundError if the given path is not found.
          NotADirectoryError if the given path isn't a valid directory.
      """
      from pyarrow.fs import FileSelector, FileType, LocalFileSystem
  
      full_path = self._resolve_path(path)
      selector = FileSelector(full_path, recursive=False)
      try:
          files = self.fs.get_file_info(selector)
      except FileNotFoundError as e:
          raise e
      except OSError as e:
          if _is_os_error_file_not_found(e):
              raise FileNotFoundError(*e.args)
          raise e
      if self.fs is not LocalFileSystem and not files:
          # TODO(suquark): pyarrow does not raise "NotADirectoryError"
          # for non-local filesystems like S3. Check and raise it here.
          info = self.fs.get_file_info([full_path])[0]
          if info.type == FileType.File:
              raise NotADirectoryError(
                  f"Cannot list directory '{full_path}'. "
                  f"Detail: [errno 20] Not a directory"
              )
      return files
  
imports: import os
  import re
  import urllib
  from pathlib import Path
  from typing import TYPE_CHECKING, List, Optional
  from ray._private.client_mode_hook import client_mode_hook
  from ray._private.utils import _add_creatable_buckets_param_if_s3_uri, load_class
  from ray._private.auto_init_hook import wrap_auto_init
label_desc: Use image node_id 7 for calling the KVClient obj's underlying member method code with example usage: obj.list(path) and returns: files