0

I have an app with thousands (9..100)K tiny files, that are read/written/deleted/created, it's a user data. When they're located on a disk, it's no issue. But now I'm trying to move that stuff to the iCloud and sync becomes a pain because of that number.

What I see as a possible solution might be creating a RW disk volume image, say, DMG, putting it into iCloud and mounting it on app start and unmounting on app termination, saying it should write to the mounted directory. This way I'll have to transfer the only 1 file on/out of iCloud. Moreover I will benefit some kind of "transactional behavior", because there won't be possible anymore to have a partially sync and broken state.

Is it possible to do so? Googling around doesn't give me any ideas. Or maybe there are other approaches that I miss?

I have to say that I can't simply override the app's behavior to use lots of files — only direct it to use particular directory.

apollov
  • 117
  • 9
  • Is there a specific reason you're saving the data into thousands of files instead of using a database? That sounds like a nightmare to maintain. – AdamPro13 Mar 10 '21 at 21:03
  • @AdamPro13 it's not me, I've made a port of a game to iOS platform, and this game uses that approach. Btw good question, I think I'm to address it to the devs team. – apollov Mar 10 '21 at 23:11

0 Answers0