Expose additional directory entry fields
See original GitHub issueThe smbclient.scandir
function returns an iterator to SMBDirEntry
objects – and since the directory is queried for FILE_ID_FULL_DIRECTORY_INFORMATION
, the internal _dir_info
structure holds additional useful information such as allocation_size
and last_write_time
.
These should be exposed the same way that inode()
is exposing the file_id
field.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
os: new Readdirentries method to read directory entries and ...
Could we please have a new File-level API to list a directory's entries, which exposes the d_type field ( syscall.Dirent.
Read more >Chapter 5. Directory Entry Schema Reference
This chapter provides an overview of some of the basic concepts of the directory schema and lists the files in which the schema...
Read more >Provide optional claims to Azure AD apps - Microsoft Entra
How to add custom or additional claims to the SAML 2.0 and JSON Web ... in extension attributes and directory extensions to add...
Read more >Dockerfile reference - Docker Documentation
Environment variables are supported by the following list of instructions in the Dockerfile : ADD; COPY; ENV; EXPOSE; FROM; LABEL; STOPSIGNAL ...
Read more >os — Miscellaneous operating system interfaces — Python ...
For creating temporary files and directories see the tempfile module, ... scandir() to expose the file path and other file attributes of a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just as an FYI this is somewhat possible today through public interfaces
This is essentially what
scandir
does except now you are just dealing with the raw information.Unfortunately it does expose the raw structure value back which isn’t the easiest to deal with.
Perhaps a new function
querydir
which can then return a richer object that more closely models the file information class?That is – we keep
SMBDirEntry
for the result ofscandir
but introduce a new class for the result ofquerydir
that explicitly exposesFileInformationClass.FILE_ID_FULL_DIRECTORY_INFORMATION
(or whatever information class is requested).This might then also be an opportunity to dial down the information class for
scandir
– presumably it costs a little extra on the server side to retrieve all that metadata.