• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
reading/writing files from mounted device directly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading/writing files from mounted device directly


  • Subject: reading/writing files from mounted device directly
  • From: "Dave Hackenyos" <email@hidden>
  • Date: Tue, 29 Aug 2006 13:10:28 -0700
  • Thread-topic: reading/writing files from mounted device directly

Hello,

            I am developing a product for the Macintosh platform that requires I read and write files from a mounted device. Information on the mounted device is being updated in real time but I am unable to detect the changes due to the operating system (Darwin?) caching the contents of the device into a buffer which remains static until I unmount the drive with a “diskutil unmount” command. Continually mounting and unmounting the device to see changes in a file is not desirable.

            Using the IOKit to obtain a handle to the device and then using POSIX funtions to open/read/write does allow access to the raw disk, but I can only access bytes. Reading the entire device and programmatically reproducing the file structure to locate the file I am interested in reading is prohibitive. Changing a file and writing the entire contents of the drive back into it would take 30 seconds or more, also bad. I need a way to read and write to the file system on the mounted device not just access the bytes.

 

            Is there a no-cache option on mounting what is effectively a USB storage device? Or how do I bypass the cached buffer?

 

            Please let me know if there is a more appropriate forum for asking this question.

 

Thank you for your time,

Dave Hackenyos

email@hidden  

 

This message has been scanned by Symantec Mail Security for SMTP.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: reading/writing files from mounted device directly
      • From: Uli Kusterer <email@hidden>
    • Re: reading/writing files from mounted device directly
      • From: Brian Bergstrand <email@hidden>
  • Prev by Date: Strange sound issues
  • Next by Date: Re: reading/writing files from mounted device directly
  • Previous by thread: Re: Strange sound issues
  • Next by thread: Re: reading/writing files from mounted device directly
  • Index(es):
    • Date
    • Thread