Skip to content

Latest commit

 

History

History
60 lines (57 loc) · 3.42 KB

interface.rst

File metadata and controls

60 lines (57 loc) · 3.42 KB

PyFilesystem API

The following is a complete list of methods on PyFilesystem objects.

  • ~fs.base.FS.appendbytes Append bytes to a file.
  • ~fs.base.FS.appendtext Append text to a file.
  • ~fs.base.FS.check Check if a filesystem is open or raise error.
  • ~fs.base.FS.close Close the filesystem.
  • ~fs.base.FS.copy Copy a file to another location.
  • ~fs.base.FS.copydir Copy a directory to another location.
  • ~fs.base.FS.create Create or truncate a file.
  • ~fs.base.FS.desc Get a description of a resource.
  • ~fs.base.FS.download Copy a file on the filesystem to a file-like object.
  • ~fs.base.FS.exists Check if a path exists.
  • ~fs.base.FS.filterdir Iterate resources, filtering by wildcard(s).
  • ~fs.base.FS.getbasic Get basic info namespace for a resource.
  • ~fs.base.FS.getdetails Get details info namespace for a resource.
  • ~fs.base.FS.getinfo Get info regarding a file or directory.
  • ~fs.base.FS.getmeta Get meta information for a resource.
  • ~fs.base.FS.getospath Get path with encoding expected by the OS.
  • ~fs.base.FS.getsize Get the size of a file.
  • ~fs.base.FS.getsyspath Get the system path of a resource, if one exists.
  • ~fs.base.FS.gettype Get the type of a resource.
  • ~fs.base.FS.geturl Get a URL to a resource, if one exists.
  • ~fs.base.FS.hassyspath Check if a resource maps to the OS filesystem.
  • ~fs.base.FS.hash Get the hash of a file's contents.
  • ~fs.base.FS.hasurl Check if a resource has a URL.
  • ~fs.base.FS.isclosed Check if the filesystem is closed.
  • ~fs.base.FS.isempty Check if a directory is empty.
  • ~fs.base.FS.isdir Check if path maps to a directory.
  • ~fs.base.FS.isfile Check if path maps to a file.
  • ~fs.base.FS.islink Check if path is a link.
  • ~fs.base.FS.listdir Get a list of resources in a directory.
  • ~fs.base.FS.lock Get a thread lock context manager.
  • ~fs.base.FS.makedir Make a directory.
  • ~fs.base.FS.makedirs Make a directory and intermediate directories.
  • ~fs.base.FS.match Match one or more wildcard patterns against a path.
  • ~fs.base.FS.move Move a file to another location.
  • ~fs.base.FS.movedir Move a directory to another location.
  • ~fs.base.FS.open Open a file on the filesystem.
  • ~fs.base.FS.openbin Open a binary file.
  • ~fs.base.FS.opendir Get a filesystem object for a directory.
  • ~fs.base.FS.readbytes Read file as bytes.
  • ~fs.base.FS.readtext Read file as text.
  • ~fs.base.FS.remove Remove a file.
  • ~fs.base.FS.removedir Remove a directory.
  • ~fs.base.FS.removetree Recursively remove file and directories.
  • ~fs.base.FS.scandir Scan files and directories.
  • ~fs.base.FS.setinfo Set resource information.
  • ~fs.base.FS.settimes Set modified times for a resource.
  • ~fs.base.FS.touch Create a file or update times.
  • ~fs.base.FS.tree Render a tree view of the filesystem.
  • ~fs.base.FS.upload Copy a binary file to the filesystem.
  • ~fs.base.FS.validatepath Check a path is valid and return normalized path.
  • ~fs.base.FS.writebytes Write a file as bytes.
  • ~fs.base.FS.writefile Write a file-like object to the filesystem.
  • ~fs.base.FS.writetext Write a file as text.