How to sync filestore to a local folder

As i keep diving into IPFS, new questions popup, so any help would be appreciated. Google wasn’t much of a help.

I need my app to be able to manage my own files in a GUI. I need it to be explorer-style showing the original filenames and directory structure.

  1. Is there a way to list my own shared files?
  2. Is my node keeping any info about the local file(name) that generated a shared object?

AFAIK i can do it using –nocopy which will use the original files for sharing and will copy nothing in .ipfs directory.
In that way i will be able to fetch the file structure from the local root folder.

So if i want to achieve my goal i can either use –nocopy, or have all needed metadata (filenames etc) managed by my app, am i correct?

A few answers just in case someone else needs them.
I hope i got it right:

  1. You can add local files using the –nocopy param.
  2. Using --nocopy the original files are added to the filestore, and not the datastore.
  3. When adding a directory recursively you can have all original filenames and paths using ipfs filestore ls.
  4. You can check the consistency of your filestore using ipfs filestore verify.

For example, if you delete a file, command (4) will flag it with “no-file”.
In that case, how can this entry be deleted from filestore too to maintain consistency?
Garbage collector (ipfs repo gc) didn’t have any effect on filestore.

EDIT: Also, when a file is deleted, how can its entry in the filestore be deleted too?
Long story short, i want my app to be able to synchronize the contents os a specific folder to IPFS filestore.
From what i see, filestore always contains the first folder i add with -r --nocopy.
No matter what i add after that, is not shown with filestore ls.
What am i missing? Where can i find detailed info about how filestore works?

1 Like