Skip to content

Emulate exists, isdir, isfile from os.path in SFTP connection #1255

Open

Description

@GPHemsley

It would be very useful if the SFTPClient class supported similar behavior to exists, isfile, and isdir from os.path.

The current recommendation appears to be using stat to identify resources:

https://stackoverflow.com/questions/18205731/how-to-check-a-remote-path-is-a-file-or-a-directory

Activity

  1. added 4 commits that reference this issue on Aug 9, 2018
    bd9424c
    c81f761
    ba985f7
    17c39fb
  2. mimi1vx commented on Aug 22, 2018

    @mimi1vx

    nice , what about pathlib like interface ?

  3. GPHemsley commented on Aug 23, 2018

    @GPHemsley
    Author

    @mimi1vx I think that might require more justification, and is separate from os.path, so I think you should file a separate issue if you're looking for that support. (And besides, I already have a pending PR for this.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions