Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Experiment with File Management via Names #40

Closed
DavidBerdik opened this issue May 6, 2020 · 3 comments
Closed

Experiment with File Management via Names #40

DavidBerdik opened this issue May 6, 2020 · 3 comments
Labels
experiment This issue is an experimental idea for improving the project and may be scrapped

Comments

@DavidBerdik
Copy link
Owner

Currently, file manipulation with InfiniDrive is managed through the use of file IDs. Ideally, file names would be used instead, but the nature of how InfiniDrive uses Google Drive means that duplicate file names are permitted, and so another identifier must be used instead. From a user experience perspective, it may be desirable to apply an artificial limitation on file names which would prohibit duplicate names. This would allow the use of file IDs to be eliminated from user interaction and could reduce user confusion.

(idea suggested by @maitreerawat)

@DavidBerdik DavidBerdik added the experiment This issue is an experimental idea for improving the project and may be scrapped label May 6, 2020
@maitreerawat
Copy link
Contributor

maitreerawat commented May 8, 2020

A simple hashtable can be used to address this problem which will match the filename with its id in the form of <key, value> pair i.e. <file name, ID>. Since we are using this data structure, the keys will always be unique i.e. duplicate file names cannot exist in such cases. If the user still wants to upload a file with the same name, they'll be provided with an option to rewrite the existing file.
Therefore whenever a user would want to use the functionalities of InfiniDrive they don't need to use file ID which will make InfiniDrive more user friendly.

@DavidBerdik
Copy link
Owner Author

Using hashing for converting between file names and IDs is a very good idea, however I believe it would be better to instead rely on querying the Drive API on an as-needed basis to reduce overhead. I have added support for using this method of conversion in 84621a3.

@DavidBerdik
Copy link
Owner Author

Since the results of @maitreerawat's experiment were successful, this feature will be included in the v1.0.18 release. No further work is needed on this feature, therefore, I am closing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
experiment This issue is an experimental idea for improving the project and may be scrapped
Projects
None yet
Development

No branches or pull requests

2 participants