Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

0.8.0 nfs-get-directory documentation error / strangeness regarding app root directory #236

Open
drunkcod opened this issue Aug 16, 2016 · 1 comment

Comments

@drunkcod
Copy link

According to the docs at https://maidsafe.readme.io/docs/nfs-get-directory "directoryPath" is mandatory
since I could find way to get the app root directory I figured perhaps a empty directory path would work.

It does, that is, leaving out ":directoryPath" gives you the application root directory.

That should probably be documented.

The strangeness is that given the documentation for /auth it's the app.id that determines the app root, the return from get directory for the app root as per above lists name as "-Root-Dir".
Functionally it does use the app.id, verified by authing a second app with the same id but another name.

I would have expected it to, if anything, use the app id as the directory name to avoid confusion.
(I did actually epxect it to return a empty or "/" name but hey..)

@hitman401
Copy link
Contributor

hitman401 commented Aug 17, 2016

I will update the docs to specify the root path is not mandatory. Will scan other parts too.

The strangeness is that given the documentation for /auth it's the app.id that determines the app root

hash(app.id) + hash(app.vendor) is used to compute the applications root directory id.

I would have expected it to, if anything, use the app id as the directory name to avoid confusion.

Thanks @drunkcod for the suggestion. The root directories of the application are stored in the network mapped to the user's session packet. Assume that a user has 20 apps and each app has stored some data in the network within the application's root directory. And if the user decides to delete the stored data (application data) and retrieve the space, he/she will be able to map the root directory of a application only using the name of the application.

This feature of managing the application data is not yet integrated into the launcher. But when that gets implemented on launcher, the user will able to identify the directory only the name and using the id would make life tough.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants