How can a library be incorporated into the user directory structure?

I’d like to create a directory so that all of the files under a user name can be included and indexed automatically, such as “Documents” But I cannot see an easy way to do that. It looks like my only choice would be to locate it under the user name directory and then move subdirectory structure under the library “files” directory. But that would require changing the default Mac convention, which I worry I might not be thinking of possible negative consequences.

For example, default structure…

USERS/[username]/Documents

Becomes…

USERS/[username]/[libraryname]/files/documents

Is there a best practice?

It’s important to understand that there are rules for library folders, so if you are using apps that move/rename files within the Documents folder, this might not be a good fit for EagleFiler, as this could lead to it think that there are missing files.

That said, you could put the [libraryname] folder directly in your home folder (as shown above), use EagleFiler to create an empty Documents folder, use Finder to delete the empty Documents folder, and then use Terminal to replace the deleted folder with a symlink to the real Documents folder:

ln -s ~/Documents/ ~/[libraryname]/Files/Documents

Wow!

Loads of stuff, including some hidden directories. That may or may not be an issues. Time will tell.

  1. My assumption is that file management will have to be done in both places, Finder and EagleFiler? So if I want to delete a file I would need to do in both places. And renaming a file in Finder would create a new entry in EagleFiler and orphan the old name record in the database.

  2. Along those lines I could delete the hidden files from EagleFiler and they would still exist in Finder. Or would EagleFiler see them as new and reindex them?

  3. If I want to give up on this experiment what would the terminal command be for reversing the alias link? (I don’t want to guess as I don’t have much terminal experience.) And would I just delete the Document directory in EagleFiler? Or would I be better to delete the library and start over?

Thanks for the insight. Fascinating stuff.

Bill

No, only in one. You can add files from either Finder or EagleFiler. To move, rename, or delete, do that from EagleFiler, and that will make changes in both places.

Deleting in EagleFiler will delete in Finder, too. If you want certain files hidden from EagleFiler, you could set it to ignore them before EagleFiler imports them.

Your Documents folder would not be moving, so if you decide you no longer want to use this EagleFiler library you could just quit EagleFiler and delete the whole [libraryname] folder.

Expanding on the above, I wanted to create a symlink to my dropbox account. I used the terminal script

ln -s ~"/Dropbox (Personal)/EagleFilerDropbox" ~/Eagle/Files/EagleFilerDropbox

Dropbox (Personal) is the name I created long ago as I already hade a business dropbox account. And Eagle is the EF library name.

But the files and folders in dropbox do not appear in EF. So I created a text file within EF as a test. In Finder under the ~/Eagle/Files/EagleFilerDropbox I see the test text file and the sync file name. so the directory is ~/Eagle/Files/EagleFilerDropbox/EagleFilerDropbox. And the dropbox files and directories appear in Finder.

Aside from your instructions above I have no experience with creating symlinks. However, upon reflection I think I might not have followed your manual instructions exactly. I think I may have deleted the EF created directory in the Eagle tree and manually added the directory in Dropbox rather than a copy and paste. I am guessing the system uses a unique ID in Finder that’s tracked in ED data file and hence blew it. Is that what happened? And is there an easy way to correct or do I need to reset the scenario and start from the top? If so, is there a Terminal command to back out the one I used for Dropbox (Personal)? Thanks

P.S. I’d like to link to my iCloud files in a similar manner too. That way one library can be searching three locations. So any helpful hints along this line would be appreciated too.

The problem may be with your Terminal command. The shortcut for your home directory (~) and quotation marks (") don’t really work together, so I think the link may not have been created properly. You could use:

ln -s "$HOME/Dropbox (Personal)/EagleFilerDropbox" ~/Eagle/Files/EagleFilerDropbox

instead. Before doing this, you should delete the EagleFilerDropbox folder in EagleFiler that you had manually created.

Neither EagleFiler nor symlinks uses unique IDs.

If you create a folder in iCloud Drive called EagleFiler-iCloud you could then use something like this:

ln -s "$HOME/Library/Mobile Documents/com~apple~CloudDocs/EagleFiler-iCloud" ~/Eagle/Files/EagleFiler-iCloud