Hello everyone, I have directory stored in an `gcs...
# ask-the-community
y
Hello everyone, I have directory stored in an
gcs
bucket, but everytime execute the workflow I will use a different bucket the question is, how can I download a directory to be used by the first task, I’m well aware that
FlyteDirectory
is used to pass dirs between tasks, but can I use it to download the dir for the first task? What I’ve tried so far is this code, but it does not work, I can’t find the directory Thanks!
Copy code
@task
def t1(input_dir: str) -> str:
    dir = FlyteDirectory(path=input_dir)
    dir.download()

    import os

 
    return str(os.listdir())
k
you could change the type of the input to
FlyteDirectory
, and use
input_dir.download()
to download the directory