npm
or your preferred package manager.redirectToLobby
redirects users to our auth lobby at auth.fission.codes, where they can make a Fission account and link their account on another device or in another browser. This function takes an optional parameter, the URL that the lobby should redirect back to (the default is location.href
).permissions
to store user data in a default app storage directory and other public and private directories. Webnative creates these directories for your app if they do not already exist.add
: add a filecat
: retrieve a fileexists
: check if a file or directory existsls
: list a directorymkdir
: create a directorymv
: move a file or directoryread
: alias for cat
rm
: remove a file or directorywrite
: alias for add
publish
function synchronises your file system with the Fission API and IPFS. WNFS does not publish changes automatically because it is more practical to batch changes in some cases. For example, a large data set is better published once than over multiple calls to publish
.CID
the updated root CID for the file systempublish
after making changes, user data will not be persisted to WNFS.history
property, which you can use to get an earlier version of that item. We use the delta
variable as the order index, primarily because the timestamps can be slightly out of sequence due to device inconsistencies.file.history.list
can be slow. The acceptable delay will depend on your application. string
requiredFileContent
(object | string | Blob | Buffer
) requiredCID
the updated root CID for the file systemstring
requiredFileContent
(object | string | Blob | Buffer
)string
requiredboolean
File
or Tree
objectstring
requiredTree | File | null
string
required{ [name: string]: Link }
Object with the file name as the key and its Link
as the value.string
requiredCID
the updated root CID for the file systemstring
requiredstring
requiredCID
the updated root CID for the file systemstring
requiredCID
the updated root CID for the file systemadd
.string
requiredFileContent
(object | string | Blob | Buffer
) requiredCID
the updated root CID for the file system