iCloud

A place to find NeoFinder support questions and answers
Post Reply
User avatar
JSS
Posts: 5
Joined: Mon Jun 26, 2023 7:00 pm

iCloud

Post by JSS »

In an iCloud folder, each file either has a Local Copy (LC) or No Local Copy (NLC) present. Consider a file Path/FileName, where FileName includes the file extension.

Finder Behavior

LC: The full file is present at Path/FileName. To transition to NLC in Finder, control-click and select "Remove Download," or wait for iCloud to do it automatically whenever it feels like it.

NLC: The iCloud indicator (a cloud with an arrow pointing downwards) appears in the Finder next to the file name. There is no file at Path/FileName. There is an invisible file at Path/.FileName.icloud, which is a 200-byte binary file. Click on the iCloud indicator (or command-click and select “Download Now”) to download the file and transition to LC.

I did not trust Finder to tell me what was present or not on the local disk. I used the Linux “ls -alh” command in the Terminal to see what files were actually there.

NeoFinder Behavior on Cataloging & Update

NeoFinder catalogs precisely what is in the folder. When a local copy is present, it does what it normally does.

The behavior depends on the Invisible files checkbox under the Ignore tab in the catalog settings when there is no local copy. If checked, then the file is not cataloged. If unchecked, the NeoFinder will catalog Path/.FileName.icloud.

In everything to follow, I have Invisible files unchecked.

Finder/NeoFinder State and Opening Files from NeoFinder

Since Finder can change the LC/NLC and NeoFinder won’t know it unless there is a catalog update, we need to consider the LC/NLC state separately for Finder and NeoFinder.

Plus, define modified NLC* state for NeoFinder: Start with NeoFinder in NLC (so Path/.FileName.icloud is cataloged) and then in the information pain change the Name field from .FileName.icloud to FileName with “Also rename on volume” checked. The NeoFinder user’s guide (section 8.6) says, “NeoFinder will also rename the original item on the disk” when this box is checked." That’s not quite what happens. Nothing changes in Finder because it always displays FileName (with or without the iCloud indicator). But Linux “ls -alh” shows that .FileName.icloud has not been renamed (which is probably not a good thing). What the “Also rename on volume” checkbox does for us is change the NeoFinder Path in the information panel to Path/FileName - which is what we want. Note that NLC* is fragile; a catalog update will revert to LC or NLC.

So now we have six Finder/NeoFinder state pairs to test. My results are presented here:
Screenshot 2023-07-07 at 5.43.16 PM.png
Screenshot 2023-07-07 at 5.43.16 PM.png (171.22 KiB) Viewed 864 times
In particular, the third row shows that if NeoFinder maintains the proper Name and Path, it operates normally even if the information record was created with Finder in LC. We need a solution for when the Finder is in NLC.

Suggested Modifications for NeoFinder

I suggest implementing a non-fragile NLC* state. This solution should work even with multiple Macs and the Finder states on different Macs in different LC/NLC. I also intend to have the NeoFinder catalogs in the iCloud. (I have yet to test that.)

On an Update: NeoFinder would first check if .FileName.icloud is present. If present, don’t change the NeoFinder record. If not, then check FileName and precede as usual. I don’t think NeoFinder should try forcing downloads on updates, as that could result in many downloads.

On open: If .FileName.icloud is present NeoFinder would need to trigger an iCloud download before opening. (The last line in my table above indicates that opening without first downloading doesn’t work.) That might be tricky; for example, I couldn’t find AppleScript support for iCloud download without opening. An alternative is to present a popup window telling the user to first download in Finder. Not pretty, but I’d be satisfied with that.
John S Sadowsky, Maryland, USA
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest