Why are there only `get/put_directory` methods fo...
# prefect-getting-started
p
Why are there only
get/put_directory
methods for filesystem, but no
get/put_file
methods?
fsspec
seems to support these. If I have a pipeline that requires a single file as an input do I have to download the entire folder?
m
Speaking for GCS specifically but I imagine it's the same across the board, directories and files are considered the same thing.
directories are just blobs with a specific naming convention that it uses to format how it displays data
p
Oh wow, I can just point it to a file instead of a directory and it works! Thanks!
I was thrown off by the name and didn't think to try it on a file.
Is there a pattern where I don't have to specify the file system type and just load it from the block type? For example, currently I have
Copy code
fs = SMB.load("azure-file-share")
while I'd like something like
Copy code
fs = RemoteFileShare.load("azure-file-share")
pass
"azure-file-share"
as a parameter to the flow to future proof the pipeline against swapping storage backend type. Does something like this make sense?