Skip to content
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

support positive count in Readdir() #61

Merged
merged 11 commits into from
Mar 20, 2019
Merged

support positive count in Readdir() #61

merged 11 commits into from
Mar 20, 2019

Conversation

Songmu
Copy link
Contributor

@Songmu Songmu commented Mar 4, 2019

follow on #60.

The Readdir() should support positive count in order to return the specified counts of files.

For it, I defined statikFS.dirs and httpFile.dirIdx for managing the internal state and use it inside Readdir().

@mattn
Copy link
Contributor

mattn commented Mar 5, 2019

I confirmed this pull-request fixes both problem. Current implementation of Readdir return all of files in the directory.

image

About problem that Name() return absolute path, this is not a big problem since most of users does not call Name() in the fs. If someone got this bug, they had report already. @rakyll I'm looking for fixing this issue. Could you please take a look?

@Songmu
Copy link
Contributor Author

Songmu commented Mar 13, 2019

How about it? @rakyll

@Songmu
Copy link
Contributor Author

Songmu commented Mar 14, 2019

Thank you for the kind reviews.
It corresponded to all the pointed out matters.
Please review again.
@rakyll

@dkumor
Copy link

dkumor commented Mar 20, 2019

@Songmu - as I understand, this PR encompasses the fixes in #55, #59 and #60, and meaning that those PRs can be closed once this gets merged in?

@rakyll
Copy link
Owner

rakyll commented Mar 20, 2019

Thanks much.

@rakyll rakyll merged commit 3bac566 into rakyll:master Mar 20, 2019
This was referenced Mar 20, 2019
@Songmu Songmu deleted the readdir branch March 21, 2019 14:36
@Songmu
Copy link
Contributor Author

Songmu commented Mar 23, 2019

Thank you, too!

ekanna pushed a commit to ekanna/statik that referenced this pull request Sep 12, 2019
Follow on rakyll#60.

The Readdir() should support positive count in order to return the specified counts of files.

For it, I defined statikFS.dirs and httpFile.dirIdx for managing the internal state and use it inside Readdir().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants