Questions tagged [apfs]

Apple file system. Designed for solid state storage devices. Used on MacOS, iOS, tvOS and watchOS.

49 questions
3
votes
1 answer

Detecting insufficient space during ofstream write, stream.fail() failed to work

I am currently writing a implementation of DOD5220.22-M. The piece of code below is for writing binary zero to a file until the disk is completely full. So the problem is using statvfs, it detects 3800158208 bytes (around 3.82gb) of writable space.…
kc12345
  • 67
  • 9
3
votes
0 answers

How to convert UTF8 NFC files to UTF8 NFD with convmv on Mac OS High Sierra?

The new Mac OS High Sierra does not convert UTF8 NFC files to NFD (https://en.wikipedia.org/wiki/Unicode_equivalence) on the file system layer (like the mac OS before did). Now I want to convert some files, because my app needs them in UTF8 NFD.…
3
votes
1 answer

How can I get the size of a directory on iOS 10.3 with APFS?

One of the benefits of APFS announced at WWDC 2016 was the ability to get the size of a directory very quickly, instead of having to walk the whole folder structure. The demo given was the Get Info window in Finder not having to asynchronously…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
2
votes
2 answers

Changing the timestamp of a symlink in macOS with APFS?

According to the man pages of touch, in order to change the timestamp on a symbolic link, one can use touch -h -t MMDDhhmm mylink. This does not work on my macOS machine with APFS, the timestamp of the link is unmodified and touch follows the link…
Damien L
  • 161
  • 6
2
votes
2 answers

Big Sur macOS 11.2.1 (20D74) is running from "APFS System Snapshot" – How to fix?

The two volumes are present "Mac SSD" and "Mac SSD - Data". However, the "Mac SSD" volume is NOT mounted, but instead, an "APFS System Snapshot" within the Mac SSD volume is mounted and seems to be where macOS is running from. How do I fix…
HirsuteJim
  • 529
  • 4
  • 13
2
votes
0 answers

Why macOS filesystem watchers are slower than Linux and doesn't work in WebStorm?

I'm using Webpack with HMR (Hot Module Reload) that allows to rebuild my source code on the fly and to update the loaded application right in-browser. It uses filesystem watchers (through chokidar) to monitor the actual changes. I've noticed that…
Slava Fomin II
  • 26,865
  • 29
  • 124
  • 202
2
votes
2 answers

How do remote file "stubs" work on Macs with APFS?

Both iCloud Drive and OneDrive for Mac support remote files (or "Files On-Demand" as OneDrive calls it). These files appear in Finder and seem to behave as real files (with odd Quick Look behavior). The Inspector shows their true size plus (4 KB on…
citelao
  • 4,898
  • 2
  • 22
  • 36
2
votes
0 answers

How to fix an APFS corruption?

A few weeks ago, I copied some directories from an old external hard drive to my iMac. I ended up with a few corrupt files due to the bad state of this ancient hard drive. I managed to delete them, but some remain. At the beginning, I thought it was…
Charaf
  • 324
  • 3
  • 18
2
votes
1 answer

iCloud NSDocument save warnings - caused by lastUsedDate file attribute?

I have an app that uses NSPersistentDocument (without autosaving) on OS X and UIDocument (also without autosaving) on iOS. The file representation is Binary Core Storage. This app has been working fine since iOS 7 + macOS 10.10. If I open a document…
MichaelR
  • 1,681
  • 15
  • 28
2
votes
2 answers

What is the Cocoa method for doing the Carbon FSExchangeObjectsCompat call?

There was this great function in the old MoreFilesX, FSExchangeObjectsCompat, that "exchanges the data between two files". It was typically used as part of a safe-save approach, where a temp file was written out, then FSExchangeObjectsCompat was…
SMGreenfield
  • 1,680
  • 19
  • 35
1
vote
0 answers

Case Sensitive FileManager.default.fileExists(atPath:)

When I on my Mac run FileManager.default.fileExists(atPath: path) the resulting check is case-insensitive. So filePath will return the same as FiLePaTh. I need it to do a case-sensitive check however. Is there any way of achieving this? I am…
Hans
  • 2,354
  • 3
  • 25
  • 35
1
vote
2 answers

Git: list case-sensitive paths that have collided during clone

When cloning a git repository that contains case-sensitive file paths (e.g. /README.md and /readme.md) on a case-insensitive file system (like NTFS or APFS), git will only check out one of the colliding files. In macOS (or Windows), how can I list…
magadan12
  • 19
  • 2
1
vote
1 answer

unexpected behavior of directory renaming in macos (other posix flavors?)

Basically, in Python or bash I can rename a directory to a different name from within that directory : at that point, from within the directory, the old name still shows, but the rename has in fact already taken place. On macos with APFS, this came…
JL Peyret
  • 10,917
  • 2
  • 54
  • 73
1
vote
0 answers

How to compute 'purgeable' disk on APFS volume, on macOS?

My application needs to know the free space on a APFS volume. It seems the operating system can 'reserve' purgeable disk space, starting from macOS High Sierra and APFS. When using NSFileManager function, it only returns 'real' free…
Antoine Rosset
  • 1,045
  • 2
  • 13
  • 22
1
vote
1 answer

Could not create a preboot for APFS install while downloading High Sierra

I was trying to factory reset my Macbook air as it was too slow and laggy. At the final stage when I was trying to reinstall High Sierra, an error poped up saying that it could not create a preboot forAPFS install. What should I do to fix this? I…