-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
listdir should take directories into account #27
Comments
Fix this in 1.1.0 |
NB this discussion is probably unrelated, but kind of cool to have discovered Just did a quick experiment, comparing the size of links with the length of the path (in characters/bytes) the link points to. System under test:
Tests
Compare to the following, which swaps the arrow character with a hyphen character
Results SummaryWhat this shows us is: The size of the symbolic link is close to the length of the name of the path the link points to. Specifically, the number of bytes required to store the link target in memory. This is why link targets with plain ascii characters demonstrate the property where the number of characters in the destination is equivalent to the number of bytes required to store that path string in memory. This is also why links with UTF characters in the target measure larger than the number of characters in the link name. UTF characters require more space to store in memory.
I believe the size of 'foo→bar' and 'foo-bar' being exactly 2 bytes different has to do with the space required to store a UTF-8 character. I cannot find exact literature to support this assertion at this time. But it's what I recall previously reading. Using http://mothereff.in/byte-counter I entered the two following values:
The byte-counter says that the former is 1 byte, and the latter is 3 bytes. |
Directories are like files.... kinda...
listdir should return tuples for those too.
Questions:
or
?
The text was updated successfully, but these errors were encountered: