Thread: Low Level I/O

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    10

    Low Level I/O

    Hey guys, I've got an assignment I'm working on which consist on a function with prototype
    Code:
    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
    Location
    Chappell Hill, Texas
    Posts
    2,332
    You'll have to read the directory to get the file names, skipping files with names . and ..
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    10
    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 Cprogramming.com
    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