Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

VFile Create new DeleteAll Fn #77

Closed
nandagopalan opened this issue Apr 17, 2023 · 1 comment · Fixed by #81
Closed

VFile Create new DeleteAll Fn #77

nandagopalan opened this issue Apr 17, 2023 · 1 comment · Fixed by #81

Comments

@nandagopalan
Copy link
Contributor

The current VFile interface defines a function Delete() that is supposed to delete file or directory. However this is confusing to use.

  1. Define a new function named DeleteAll in the VFile interface. This function will delete a file or directory with all its contents.
  2. Update the defn of Delete() fn to just delete file and throw error in case of directory
  3. Update the DeleteMatching() fn to check if the vFile object resolved by the filter is a directory ?
  1. If it s a directory call the resolvedFile.DeleteAll()
  2. If its a File call resolvedFile.Delete()
@neo7337
Copy link
Contributor

neo7337 commented Apr 23, 2023

Can we do like call the Delete() fnc and inside that if we check whether the location is a directory or not?

If it's a directory then invoke DeleteAll() and delete the directory
Otherwise delete the file

@neo7337 neo7337 mentioned this issue Apr 25, 2023
@neo7337 neo7337 linked a pull request Apr 25, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants