files-community / Files

A modern file manager that helps users organize their files and folders.
https://files.community
MIT License
34.27k stars 2.19k forks source link

Feature: Combine Alternate Data Streams with Database approach for tags #15272

Open Foadsf opened 5 months ago

Foadsf commented 5 months ago

What feature or improvement do you think would benefit Files?

Integrating support for TagSpaces tagging conventions would significantly enhance the usability of Files for users who manage their files with TagSpaces tags. TagSpaces offers two tagging methods: an invasive method that incorporates tags directly into filenames within square brackets [tag], and a non-invasive method that utilizes JSON files stored in a .ts directory adjacent to the tagged files or folders. Enabling Files to recognize and display these tags in its "info panel" would provide a seamless experience for users who rely on TagSpaces for file organization, making it easier to view and manage tagged files directly within Files. This is a follow-up to this question on Discord.

Requirements

Files Version

3.3.0.0

Windows Version

10.0.19045.4291

Comments

This feature would be particularly beneficial for users who use TagSpaces extensively for file management but wish to utilize the sleek and powerful interface of Files for their daily tasks. It bridges the gap between two powerful tools, enhancing the organizational capabilities of Files while adhering to users' established workflows.

Josh65-2201 commented 5 months ago

Thanks for the feedback, I've added this to the project board.

yaira2 commented 5 months ago

How does TagSpaces work if a file is transferred or renamed?

Foadsf commented 5 months ago

@yaira2 Not sure, TBH. ¯\_(ツ)_/¯ Asked them a question here on Twitter, let's see if they respond.

uggrock commented 5 months ago

How does TagSpaces work if a file is transferred or renamed?

File tagged with the filename method have no issues with the transferring or renaming.

If files tagged with the sidecar method are renamed or transferred, TagSpaces renames/moves the sidecar files with the meta data as well. If a folders with tagged files is moved outside of TagSpaces all the meta data is moved automatically. If you rename/transfer such file outside of TagSpaces, the connection with meta file is lost, this happens also by the database based tagging solutions.

yaira2 commented 5 months ago

If you rename/transfer such file outside of TagSpaces, the connection with meta file is lost, this happens also by the database based tagging solutions.

This is why we went with alternate data streams, they allow files to be moved externally without losing the tags.

uggrock commented 5 months ago

Alternate data streams do not work on Linux, Android or Mac and are not synced by Dropbox, Google Drive etc... They are not supported even on (ex)fat formatted USB drives.

yaira2 commented 5 months ago

Correct, there are limitations with our approach but the same is true for using a database.

From our docs (https://files.community/docs/features/tags)

Tags are saved using alternate data streams (and not in a database). We found that alternate data streams is the best approach for Files because it allows items to be transferred between locations (even without using Files) without losing their tags. However, this system has some limitations:

Tags only work on drives formatted as NTFS Tags may not work with all cloud storage providers

yaira2 commented 5 months ago

This feature request suggests that we provide an option for both methods. This is a possibility be we would prefer picking a single method based on popular demand.

yaira2 commented 5 months ago

I have a propasal that should work

  1. Central Database Storage: Implement a centralized database to store the paths of all tagged items. This will serve as the primary reference point for tagged data.
  2. Tag Embedding: Concurrently, embed the unique tag identifier (GUID) directly into the tagged file’s metadata. Note: This method is applicable exclusively to NTFS file systems due to their support for alternate data streams.
  3. Database Retrieval: Upon initiating the tagged items’ loading process, the system will first retrieve the list from the central database. It will then apply a filter to exclude any items that are no longer accessible or have been removed.
  4. Search For Embedded Tags: Files can then scan the file system for items containing tag-related alternate data streams. It will eliminate any duplicates already accounted for in the database to prevent redundancy.