Thread: Low Level I/O

  1. #1
    Registered User
    Join Date
    Jun 2009

    Low Level I/O

    Hey guys, I've got an assignment I'm working on which consist on a function with prototype
    void *copydirectoy(void *arg);
    This function will be passed two consecutive strings separated by a null character (the names of the directories) and will copy all files in the first directory into the second. These two directories are assumed already existent. I know how to open files for read/write and how to copy one to another once I have the file descriptors, and I've already parsed the directory names. I guess what I'm asking is how i go about getting each files fd in directory one.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Katy, Texas
    You'll have to read the directory to get the file names, skipping files with names . and ..
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    Registered User
    Join Date
    Jun 2009
    O right opendir, closedir, and readdir to open a directory duh... thnx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Low level program to save a mjpeg stream
    By Rufe0 in forum Linux Programming
    Replies: 6
    Last Post: 09-22-2009, 05:53 AM
  2. C/C++, low or high level?
    By Sentral in forum A Brief History of
    Replies: 4
    Last Post: 01-23-2007, 11:43 PM
  3. Low Level Drive Access?
    By coldfusion244 in forum C++ Programming
    Replies: 1
    Last Post: 03-09-2005, 08:19 AM
  4. low level I/O
    By Saya in forum C Programming
    Replies: 6
    Last Post: 01-21-2004, 02:06 PM
  5. Overlapped I/O and Completion Port :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 10-30-2002, 05:14 PM