Possible Duplicate:
SDCard content exist but cant see them
Phone running Linux Kernel(2.6.31) with SD card inserted.
[ISSUE] When data is written to SD card (write syscall) the write returns successfully. However, when the card (via phone) is accessed as a mass storage device on PC, the data is not seen.
Only after physically removing the card and reinserting it and then accessing it on PC as a mass storage device will show the data that was written. Tried fsync() after writing the data. Still it wont show.
Is the kernel maintaining a cache before writing the data to SD card? If so, how do I make sure it is flushed to the SD card?
[edit] removed tag MMC
Your problem is an exact duplicate of SDCard content exist but cant see them - the PC is displaying the content as returned from the MTP interface.
Stub code to do what you need to make the file appear:
imports:
stub code: