2 ms·
Not anymore, does it? https://eclecticlight.co/2023/10/25/macos-sonoma-has-changed-icloud-drive-radically/ https://eclecticlight.co/2023/10/25/macos-sonoma-has-
by Someone 2y ago
Not anymore, does it? https://eclecticlight.co/2023/10/25/macos-sonoma-has-changed-icloud-drive-radically/ https://eclecticlight.co/2023/10/25/macos-sonoma-has-changed...:
“I suspect these new evicted files take advantage of a trick in APFS: as far as I can tell, they consist of the file with its attributes and extended attributes intact and stored locally, but no extents for its data. Thus, when you ask for the file size, it returns the size it would be when downloaded, although the file only takes the space required for its attributes and extended attributes, until it has been downloaded.”
Also (https://developer.apple.com/documentation/technotes/tn3150-getting-ready-for-data-less-files https://developer.apple.com/documentation/technotes/tn3150-g...):
“Check if a file is dataless and then only access it in a safe context. To do the check, call stat or getattrlist and examine if SF_DATALESS is present in stat.st_flags. Be aware that stat and getattrlist both trigger the materialization of any intermediate folders in the file’s path, if they themselves are dataless.”
⇒ doing stat on an entire filesystem will materialize all directories, but not its files.