Skip to content

The Eclectic Light Company

Macs & painting – 🦉 No AI content
Main navigation
  • Downloads
  • Freeware
  • M-series Macs
  • Mac Problems
  • Mac articles
  • Macs
  • Art
hoakley August 6, 2023 Macs, Technology

Last Week on My Mac: Are we ready for dataless files?

Files come in many types and forms, but common to them are the file’s attributes, such as its identifiers and permissions, its data, and any additional metadata, typically on the Mac in the form of extended attributes. For the great majority of files, it’s the data that determines that file’s purpose and use. Without that, the file is but a stub, a placeholder for its real self.

For the last decade, iCloud has been able to evict files entrusted to it for storage, by removing locally stored data for that file and replacing it with a stub, a dataless file which must be downloaded or materialised before the contents of its data can be accessed locally. Other forms of cloud storage behave similarly, and Apple rightly draws attention to the growing problem that such dataless files pose both developers and users, in TN3150: Getting ready for dataless files. As put succinctly there: “materializing a dataless file can take time if the file is large or there are poor network conditions. In such a scenario, the app may become unresponsive.”

Over the last couple of weeks I have been exploring how macOS and its features handle dataless files. While apps that take advantage of AppKit’s NSDocument to read and write files should handle these problems seamlessly, there are some definite seams when it comes to macOS services. These result from three constraints:

  • features reliant on the contents of file data can’t be used with dataless files;
  • features reliant on file data stored outside the file aren’t available to other systems accessing that file from iCloud;
  • limitations on the total size of extended attributes in iCloud storage may require some to be removed.

Features relying on file data

Perhaps the most obvious feature that’s lost with any dataless file is the ability to back it up locally. Although storage in iCloud should not only guarantee files against loss, but also preserve them in the event of loss of local backup storage, there are circumstances where iCloud storage is insufficient to preserve older versions of files, depending on when they are evicted and materialised from iCloud. It’s not hard to envisage conditions in which a file that is changed frequently but seldom stored locally for long before it’s evicted again, can escape all local backups. The more frequent those backups, the less likely they will fail to capture each version of that file before it’s evicted again. It seems unlikely, though, that macOS keeps track of that and takes it into account in eviction or backup.

Although less critical, absence of dataless files from the results of Spotlight searches is more obtrusive and frustrating to users. Further work is required before it can be determined whether Spotlight simply excludes search results, or whether the file’s entries in Spotlight’s indexes are removed on eviction. In the latter case, re-indexing is required after a dataless file is materialised to local storage again.

Least significant of these lost features is the file’s QuickLook thumbnail and preview. Selecting a dataless file in the Finder and triggering regeneration of its thumbnail is a trivial method of forcing files to be materialised.

Features relying on other data

The prime example of this constraint is document versions. These are normally stored locally on the same volume as the document, in a hidden folder. In the case of files in iCloud Drive, that almost invariably means the top level of that Mac’s Data volume. Stored versions aren’t transferred when a file is moved to a different local volume, neither are they transferred into iCloud storage. This results in versions remaining accessible only on the system that saved those versions locally. Fortunately, this appears to be unaffected by eviction and materialisation.

While many users never access saved versions of documents, and some apps don’t create them in the first place, for anyone wanting to use versions this is a significant constraint that might require them to switch systems during editing of a document, to access a previous version there. This is a longstanding limitation to the use of iCloud.

Limited size of extended attributes

Apple sets a maximum file size for iCloud Drive of 50 GB, but nowhere have I found any explicit limit placed on the total size of a file’s extended attributes. Experimentation demonstrates that the effective limit is about 32,650 bytes (slightly less than 32,767). Although this is unlikely to affect many files, it almost guarantees that Resource Forks (com.apple.ResourceFork) will be removed from files that are either:

  • uploaded to iCloud Drive from one system, then accessed from another system, or
  • evicted from local storage, then materialised to the same system.

This occurs irrespective of the xattr flag applied.

This is most apparent when customising icons on folders and files, which still relies on using Resource Forks, and therefore can only work locally, and not via iCloud Drive. While this is a nice reminder of the history of Mac OS, it’s high time that it was replaced by a mechanism that’s better suited to modern macOS and iCloud.

Is macOS ready for dataless files?

Currently, macOS has several undocumented constraints when working with dataless files. Although most might appear to be edge cases, the following need further attention:

  • Time Machine backups,
  • Spotlight searches,
  • Document versions,
  • Custom icons on folders and documents.

To quote Apple: “The system, or a person using the device, can make dataless files whenever they determine it’s appropriate, and your app needs to be ready to handle them.” So does macOS.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
Like Loading...

Related

Posted in Macs, Technology and tagged Cloud, dataless file, extended attributes, iCloud, iCloud Drive, metadata, search, Spotlight, version, xattr. Bookmark the permalink.

10Comments

Add yours
  1. 1
    Enzo Vincenzo's avatar
    Enzo Vincenzo on August 6, 2023 at 8:20 am

    Hi Howard, you wrote:
    “Selecting a dataless file in the Finder and triggering regeneration of its thumbnail is a trivial method of forcing files to be materialised.”
    What do I ignore and have always missed to refresh the Finder thumbnails fastly? CMD+R in Finder, e.g., doesn’t work…
    When Finder doesn’t create thumbnail icons for files, the only way I know and use is to move the folders or files to the desktop (or other location in Finder) and put them back where they were, after Finder creates the thumbnails :- (. This happens to me often especially with many of the photos in HEIC format downloaded to my Mac from my iPhone XS.
    So, is there an easy, instant and fast way to update the preview icon of a single file or groups of files?
    Thanks.

    LikeLiked by 1 person

    • 2
      hoakley's avatar
      hoakley on August 6, 2023 at 8:50 am

      Not that I know of.
      In this case, it’s not the same as updating a local file. When you evict (or remove the download) for a file in iCloud Drive, any custom QuickLook thumbnail or preview is removed from local storage. If that type of document has a generic icon, selecting it can simply show that icon and thumbnail. But for documents such as text, RTF and PDF, where QuickLook should display a thumbnail preview of the document, it can’t do that unless the document’s data is stored locally, as it requires that to generate the thumbnail. That’s normally sufficient reason for iCloud to download/materialise that document. When you’re trying to study evicted document stubs, this is a great nuisance, as selecting them in the Finder or in Open File dialogs triggers the download/materialisation process. That’s why Cirrus has its own browser scheme, which doesn’t use the Finder, so leaves evicted stub documents untouched.
      Howard.

      LikeLike

      • 3
        Andrew Roazen's avatar
        Andrew Roazen on September 27, 2023 at 6:57 pm

        In Monterey, the only methods I’m aware of for restoring the QL/thumbnail involve opening the file for reading either through Finder or accessing the contents in Terminal e.g. `cat filename.ext > /dev/null`, both of which strip the file’s `compressed,dataless` attributes. Get Info shows no preview, and dataless blocks `qlmanage -r`. If there’s an actual trivial method I’m interested in hearing it.

        LikeLiked by 1 person

        • 4
          hoakley's avatar
          hoakley on September 27, 2023 at 9:30 pm

          Try putting a Finder window into column view, so that it shows QL thumbnails, and just selecting the file. It has been the bane of my life when trying to develop for iCloud: no sooner do you evict a file using your own code, than QL is downloading it again to build its thumbnail. It works the same in Open File dialogs (which are Finder-based) too.
          Howard.

          LikeLike

  2. 5
    SarahB's avatar
    SarahB on August 6, 2023 at 8:49 am

    Thank you for what you wrote once again. I guess I always had some fear of using iCloud more than I do. Like thinking I could have something kept safe there and not worry about losing it. I don’t blame iCloud though. I’ve never wanted to even use a NAS.

    I backup all my data myself and have over 30 hard drives and all my personal data and media on them have at least 2 clones of the original. I only trust what I can do myself and can’t seem to leave it up to the cloud.

    I could never enable Optimize Mac Storage. Even for my apple Mail I pull all mail off iCloud’s servers and move to my Mac. It’s probably good some people put trust in a cloud service since they would have nothing without it. I only trust it so much. Maybe it would help if apple provided more documentation. I find they don’t do that so often.

    Decades ago I lost a couple hard drives and all my digital photos. I guess ever since then I really need to feel in control of my media and have many different backups.

    LikeLiked by 1 person

    • 6
      hoakley's avatar
      hoakley on August 6, 2023 at 8:51 am

      Thank you. I share your healthy distrust of cloud storage, although it can also be extremely useful at times. I think there’s a happy medium where you have both local backups and copies in iCloud.
      Howard.

      LikeLike

      • 7
        SarahB's avatar
        SarahB on August 6, 2023 at 8:58 am

        It’s like how 1password switched to cloud and I was a long time user since they began. But not being able to save out my own vault drove me nuts since they moved to the cloud or host my own vault.

        Even when I put trust in them as a company, my vault is still something I want in my control.

        I mostly have a lot of media like movies and tv shows and music. So uploading it to a cloud isn’t practical. It’s why I have so many hard drives and do my own clones but does leave me open for failure in some cases like if there is a fire here.

        I mostly just use iCloud and for the basics mostly syncing basic things across my mac’s to set them up and keep data in sync. I don’t even use the Photos app though since trusting that with my photos was never something I could do.

        LikeLiked by 1 person

  3. 8
    David C.'s avatar
    David C. on August 7, 2023 at 4:24 pm

    It’s a shame that after all this time, apps (including apps from Apple) still can’t deal with dataless files. This is not a new concept.

    In fact, the earliest versions of Mac system saw plenty of files consisting entirely of resource-fork data and an empty data fork. This was the case for apps and for some kind of documents (e.g. sound files).

    The reasons-for and nature-of dataless files has changed over the decades, but the concept is a very old one. You’d like to think that 40 years later, Apple (if not the Mac development community at large) would know how to deal with dataless files and their testing teams would check for apps that don’t.

    But apparently not.

    LikeLiked by 1 person

    • 9
      hoakley's avatar
      hoakley on August 7, 2023 at 6:53 pm

      Thank you.
      I don’t think resource-only files really count, as they merely store their data in a different fork. It’s still data, rather than genuine metadata in the way that modern xattrs are.
      Howard.

      LikeLiked by 1 person

  4. 10
    Michael Tsai - Blog - Getting Ready for Dataless Files on August 10, 2023 at 2:24 pm

    […] Update (2023-08-10): Howard Oakley: […]

    LikeLike

·Comments are closed.

Quick Links

  • Free Software Menu
  • System Updates
  • M-series Macs
  • Mac Troubleshooting Summary
  • Mac problem-solving
  • Painting topics
  • Painting
  • Long Reads

Search

Monthly archives

  • January 2026 (7)
  • December 2025 (75)
  • November 2025 (74)
  • October 2025 (75)
  • September 2025 (78)
  • August 2025 (76)
  • July 2025 (77)
  • June 2025 (74)
  • May 2025 (76)
  • April 2025 (73)
  • March 2025 (78)
  • February 2025 (67)
  • January 2025 (75)
  • December 2024 (74)
  • November 2024 (73)
  • October 2024 (78)
  • September 2024 (77)
  • August 2024 (75)
  • July 2024 (77)
  • June 2024 (71)
  • May 2024 (79)
  • April 2024 (75)
  • March 2024 (81)
  • February 2024 (72)
  • January 2024 (78)
  • December 2023 (79)
  • November 2023 (74)
  • October 2023 (77)
  • September 2023 (77)
  • August 2023 (72)
  • July 2023 (79)
  • June 2023 (73)
  • May 2023 (79)
  • April 2023 (73)
  • March 2023 (76)
  • February 2023 (68)
  • January 2023 (74)
  • December 2022 (74)
  • November 2022 (72)
  • October 2022 (76)
  • September 2022 (72)
  • August 2022 (75)
  • July 2022 (76)
  • June 2022 (73)
  • May 2022 (76)
  • April 2022 (71)
  • March 2022 (77)
  • February 2022 (68)
  • January 2022 (77)
  • December 2021 (75)
  • November 2021 (72)
  • October 2021 (75)
  • September 2021 (76)
  • August 2021 (75)
  • July 2021 (75)
  • June 2021 (71)
  • May 2021 (80)
  • April 2021 (79)
  • March 2021 (77)
  • February 2021 (75)
  • January 2021 (75)
  • December 2020 (77)
  • November 2020 (84)
  • October 2020 (81)
  • September 2020 (79)
  • August 2020 (103)
  • July 2020 (81)
  • June 2020 (78)
  • May 2020 (78)
  • April 2020 (81)
  • March 2020 (86)
  • February 2020 (77)
  • January 2020 (86)
  • December 2019 (82)
  • November 2019 (74)
  • October 2019 (89)
  • September 2019 (80)
  • August 2019 (91)
  • July 2019 (95)
  • June 2019 (88)
  • May 2019 (91)
  • April 2019 (79)
  • March 2019 (78)
  • February 2019 (71)
  • January 2019 (69)
  • December 2018 (79)
  • November 2018 (71)
  • October 2018 (78)
  • September 2018 (76)
  • August 2018 (78)
  • July 2018 (76)
  • June 2018 (77)
  • May 2018 (71)
  • April 2018 (67)
  • March 2018 (73)
  • February 2018 (67)
  • January 2018 (83)
  • December 2017 (94)
  • November 2017 (73)
  • October 2017 (86)
  • September 2017 (92)
  • August 2017 (69)
  • July 2017 (81)
  • June 2017 (76)
  • May 2017 (90)
  • April 2017 (76)
  • March 2017 (79)
  • February 2017 (65)
  • January 2017 (76)
  • December 2016 (75)
  • November 2016 (68)
  • October 2016 (76)
  • September 2016 (78)
  • August 2016 (70)
  • July 2016 (74)
  • June 2016 (66)
  • May 2016 (71)
  • April 2016 (67)
  • March 2016 (71)
  • February 2016 (68)
  • January 2016 (90)
  • December 2015 (96)
  • November 2015 (103)
  • October 2015 (119)
  • September 2015 (115)
  • August 2015 (117)
  • July 2015 (117)
  • June 2015 (105)
  • May 2015 (111)
  • April 2015 (119)
  • March 2015 (69)
  • February 2015 (54)
  • January 2015 (39)

Tags

APFS Apple Apple silicon backup Big Sur Blake Bonnard bug Catalina Consolation Console Corinth Delacroix Disk Utility Doré El Capitan extended attributes Finder firmware Gatekeeper Gérôme High Sierra history of painting iCloud Impressionism landscape LockRattler log M1 Mac Mac history macOS macOS 10.12 macOS 10.13 macOS 10.14 macOS 10.15 macOS 11 macOS 12 macOS 13 macOS 14 macOS 15 malware Metamorphoses Mojave Monet Monterey Moreau myth narrative OS X Ovid painting performance Pissarro Poussin privacy Renoir riddle Rubens Sargent security Sierra SilentKnight Sonoma SSD Swift Time Machine Tintoretto Turner update upgrade Ventura xattr Xcode XProtect

Statistics

  • 21,118,573 hits
Blog at WordPress.com.
Footer navigation
  • Free Software Menu
  • About & Contact
  • Macs
  • Painting
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • SilentKnight, Skint, SystHist, silnite, LockRattler & Scrub
  • DelightEd & Podofyllin
  • xattred, SpotTest, Spotcord, Metamer & xattr tools
  • 32-bitCheck & ArchiChect
  • XProCheck, T2M2, LogUI, Ulbow, blowhole and log utilities
  • Cirrus & Bailiff
  • Precize, Alifix, UTIutility, Sparsity, alisma, Taccy, Signet
  • Versatility & Revisionist
  • Text Utilities: Textovert, Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • Updates
  • Spundle, Cormorant, Stibium, DropSum, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • M-series Macs
  • Mints: a multifunction utility
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • System Updates
  • Saturday Mac Riddles
  • Last Week on My Mac
  • sysctl information
Secondary navigation
  • Search

Post navigation

Painting from a canoe 1
Painting from a canoe 2

Begin typing your search above and press return to search. Press Esc to cancel.

  • Reblog
  • Subscribe Subscribed
    • The Eclectic Light Company
    • Join 8,899 other subscribers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d