fuse-google-drive
fuse-google-drive copied to clipboard
Folders
My understanding is that Google Drive supports having multiple parent folders for a single file. Should we mimic this with soft or hard links?
If not, how do we handle this? Having the same file listed in each parent dir could cause issues if they do rm dir1/file,
because then we need to make sure we remove it from every other directory or leave it in all of those and remove the reference from dir1
Source: https://plus.google.com/103354693083460731603/posts/h1jABDzXCqD
Hashed out in IRC that using hardlinks makes sense for this.
Additionally -- how should folders be represented internally?
I am thinking a tree of the form:
struct tree_t {
// If this is NULL then this is a leaf node
struct tree_t *children;
// If this is NULL then we have no parent folders other than /
struct tree_t *parents;
// A link to the actual data for this file/folder
struct gd_fs_entry_t *entry;
};
There may be a simpler way to do this, though.