Feature Request: Gaia `ls` functionality

I’m currently using an indexing strategy to solve this problem, but I recall hearing there are alternate solutions that may be more efficient–does anybody have a way of:

  1. Listing all files/directories on a user’s GAIA?
  2. Listing subdirectory contents on a user’s GAIA, from a specified path?

Hey @alexc.id

Currently there’s no support for an ls like command on Gaia. However, this is a popular feature request, and something we’ll probably want to add in the medium term. In the mean-time, using indexes is the way to go.

1 Like

Thanks @aaron. @jude mentioned he had some trickery in Berlin, but perhaps I misunderstood.

Hey @alexc.id ,

There are two things you can do:

  • Use a library “on top” of the Blockstack Gaia API that automatically implements directory lists for you. You could implement mkdir and listdir as specially-crafted calls to getFile and putFile.

  • You can use a storage system behind your Gaia hub that implements a listdir primitive, and just call that directly.

1 Like