How to reset your filesystem

Written for webnative 0.24

In most cases this should be avoided, but in case you do want to risk it, here’s how you reset your filesystem.

NOTE: This could change at any time. If by the time you read this a lot of time has passed since us posting this, ask us to review this post before you undertake this reset.

Steps

  1. Go to the Fission Drive app
  2. Open up the browser console
  3. Type the following in the console.
    fs = await wn.fs.empty({
      rootKey: fs.root.privateTrees["private/"].key
    })
    await fs.mkdir({ directory: [ wn.path.Branch.Private, "Apps" ] })
    await fs.mkdir({ directory: [ wn.path.Branch.Private, "Audio" ] })
    await fs.mkdir({ directory: [ wn.path.Branch.Private, "Documents" ] })
    await fs.mkdir({ directory: [ wn.path.Branch.Private, "Photos" ] })
    await fs.mkdir({ directory: [ wn.path.Branch.Private, "Video" ] })
    await fs.publish()
    
  4. Wait till publish is finished (you should see DNSLink updated)
  5. Sign out of Drive (either by clicking sign out in menu, or clearing website data in dev tools)
  6. Sign back in.
  7. :+1:

In case fs.root.privateTrees["private/"].key fails, you can also get the rootKey from the auth lobby. There you would run await myReadKey() in the dev console to get it.

3 Likes