Skip to content

support positive count in Readdir()#61

Merged
rakyll merged 11 commits into
rakyll:masterfrom
Songmu:readdir
Mar 20, 2019
Merged

support positive count in Readdir()#61
rakyll merged 11 commits into
rakyll:masterfrom
Songmu:readdir

Conversation

@Songmu

@Songmu Songmu commented Mar 4, 2019

Copy link
Copy Markdown
Contributor

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

mattn commented Mar 5, 2019

Copy link
Copy Markdown
Contributor

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

Songmu commented Mar 13, 2019

Copy link
Copy Markdown
Contributor Author

How about it? @rakyll

Comment thread fs/fs.go Outdated
Comment thread fs/fs.go Outdated
Comment thread fs/fs.go
Comment thread fs/fs_test.go Outdated
Comment thread fs/fs_test.go Outdated
Comment thread fs/fs.go
@Songmu

Songmu commented Mar 14, 2019

Copy link
Copy Markdown
Contributor Author

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

@dkumor

dkumor commented Mar 20, 2019

Copy link
Copy Markdown

@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

rakyll commented Mar 20, 2019

Copy link
Copy Markdown
Owner

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

Songmu commented Mar 23, 2019

Copy link
Copy Markdown
Contributor Author

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