0

When rebuilding a perfectly working iPhone project on iOS 4 SDK, I found out that fstat() returns a bogus value in the stat.st_size field. Observed on iPhone 3 simulator with iOS 4. Looks like there's a discrepancy between the binary layout of the stat structure in the program and in the API. I've found a workaround (lseek() to the end), but this looks like a bug to me. How do I submit a bug report to Apple, please?

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • How do you work around the problem? I need to get the free disk space on iOS, but the value is not accurate as of iOS 5.1 as well. I also tried Cocoa's framework as suggested in here: http://stackoverflow.com/a/9180064/474330 but that doesn't work as well... :( – Zennichimaro Jan 25 '13 at 02:20
  • open() then lseek() to the end. Read the question. All I needed was file size for a specific size. By the way, the logical file size as returned by lseek() or stat() is NOT equal to the space it takes on the disk. – Seva Alekseyev Jan 25 '13 at 03:08

1 Answers1

2

https://bugreport.apple.com/

JosephH
  • 37,173
  • 19
  • 130
  • 154