databricks-cli/libs/filer
Pieter Noordhuis 1c0d67f66c
Add fs.FS adapter for the filer interface (#422)
## Changes

This enables the use of `io/fs` functions `fs.Glob` and `fs.WalkDir`
with filers.

We can't use `fs.FS` as the standard interface instead of `filer.Filer` because:
1. It was made for reading from filesystems only, not writing
2. It doesn't take a context for the core functions

Therefore a wrapper will do.

## Tests

* Added unit tests to cover the adapter through a fake filer.
* Manually ran `fs.WalkDir` against both WSFS and DBFS filers.
2023-06-02 12:49:59 +00:00
..
dbfs_client.go Add check for path is a directory in filer.ReadDir (#426) 2023-06-02 12:28:35 +02:00
filer.go Add check for path is a directory in filer.ReadDir (#426) 2023-06-02 12:28:35 +02:00
fs.go Add fs.FS adapter for the filer interface (#422) 2023-06-02 12:49:59 +00:00
fs_test.go Add fs.FS adapter for the filer interface (#422) 2023-06-02 12:49:59 +00:00
root_path.go Add Mkdir and ReadDir functions to filer.Filer interface (#414) 2023-05-31 11:11:17 +02:00
root_path_test.go Add Mkdir and ReadDir functions to filer.Filer interface (#414) 2023-05-31 11:11:17 +02:00
slice.go Abstract over file handling with WSFS or DBFS through filer interface (#135) 2022-12-14 15:37:14 +01:00
slice_test.go Abstract over file handling with WSFS or DBFS through filer interface (#135) 2022-12-14 15:37:14 +01:00
workspace_files_client.go Add check for path is a directory in filer.ReadDir (#426) 2023-06-02 12:28:35 +02:00