NSFS | NC | Refactor Bucketspace_fs.delete_bucket() and others #7938
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explain the changes
delete_bucket()
function in 2 aspects -- The 3 (different functions) calls to namespace_bucket_cache functions
were merged to a new function call that returns bucket and ns info.
- Moved inline tmpdir path to a function in native_fs_utils (called this function from other places as well)
read_bucket_full_info()
.- Added 2 new functions called
get_bucket_tmpdir_full_path()
andget_bucket_tmpdir_name()
and changed the calls from different files to re-use this code block.- Renamed
get_bucket_tmpdir()
toget_bucket_tmpdir_name()
and changed theimplementation to call the native_fs_utils function.
- Added
get_bucket_tmpdir_full_path()
to call the compatiblenative_fs_utils.js
function with the namespace bucket_path and bucket_id.VSC error fixes -
bucketspace_simple_fs.js -
- Added missing put_bucket_logging(), get_bucket_logging(), delete_bucket_logging() function declerations (unimplemented).
- Added function declaretions to delete_bucket() and get_bucket_website()
nb.d.ts - Added a new type NativeFSUserObject and added it to the return value of getpwname() (fixed errors in test_bucketspace_fs.js)
Issues: Fixed #xxx / Gap #xxx
Testing Instructions: