question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ls includes requested path as file

See original GitHub issue

Example:

>>> fs.ls('my-bucket/Files', details=True)
[                                                                                                                                                                                                           
    {                                                                                                                                                                                                       
        'ETag': '"d23d8cd98f00b204e9800008ecf8427e"',                                                                                                                                                       
        'Key': my-bucket/Files/',                                                                                                                                            
        'LastModified': datetime.datetime(2020, 3, 11, 11, 49, 10, tzinfo=tzutc()),                                                                                                                         
        'Size': 0,                                                                                                                                                                                          
        'StorageClass': 'STANDARD',                                                                                                                                                                         
        'name': 'my-bucket/Files/',                                                                                                                                           
        'size': 0,                                                                                                                                                                                          
        'type': 'file',                                                                                                                                                                                     
    }
]

I’d argue that ls shouldn’t return itself, but at the very least it should be of type == ‘directory’

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mvanderleecommented, Apr 6, 2020

And with that this issue is larger than just ls since rm(path, recursive=True) does not delete folders.

0reactions
swecocommented, Apr 23, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

ls - List file and directory names and attributes - IBM
ls lists files and directories. If the pathname is a file, ls displays information about the file according to the requested options. If...
Read more >
ls -- list file and directory names and attributes - MKS Toolkit
DESCRIPTION. ls lists files and directories. If the pathname is a file, ls displays information on the file according to the requested options....
Read more >
Print only full paths of files and directories using `ls` - Super User
For a given directory the request is to print ...
Read more >
List all files (with full paths) in a directory (and subdirectories ...
Save this question. Show activity on this post. I'd like to construct a Linux command to list all files (with their full paths)...
Read more >
request: jfrog rt ls · Issue #198 - GitHub
I would love being able to list files or directories from a artifactory path, ignoring subfolder. Example: $ jfrog rt ls repo/path/to/foder.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found