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

FileSystemDirectoryHandle.removeRecursively() seems redundant with FileSystemHandle.remove()? #54

Closed
pwnall opened this issue May 16, 2019 · 1 comment · Fixed by #55
Milestone

Comments

@pwnall
Copy link
Collaborator

pwnall commented May 16, 2019

FileSystemDirectoryHandle.removeRecursively() - https://wicg.github.io/native-file-system/#api-filesystemdirectoryhandle-removerecursively

FileSystemHandle.remove() - https://wicg.github.io/native-file-system/#api-filesystemhandle-remove

It seems to me that remove() should do the same thing as removeRecursively() when called on a directory. Alternatively, we could specify that remove() is the equivalent of rm for files and rmdir (fails for non-empty dirs) for directories. If we go down that route, I'll advocate that we get rid of removeRecursively(), because it wouldn't add a new capability.

To be clear, "specify" here doesn't mean "let's write down the entire algorithms for everything". I think that a one-sentence note would be sufficient for the intended consumers of this draft spec.

@mkruisselbrink
Copy link
Contributor

The intention of the current API was indeed for remove() to not be recursive. #55 is another option for how to change remove/get rid of this redundancy.

@mkruisselbrink mkruisselbrink added this to the MVP milestone Jun 3, 2019
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 a pull request may close this issue.

2 participants