Low Level I/O

This is a discussion on Low Level I/O within the C Programming forums, part of the General Programming Boards category; Hey guys, I've got an assignment I'm working on which consist on a function with prototype Code: void *copydirectoy(void *arg); ...

  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
    Katy, Texas
    Posts
    2,309
    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
    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, 10:43 PM
  3. Low Level Drive Access?
    By coldfusion244 in forum C++ Programming
    Replies: 1
    Last Post: 03-09-2005, 07:19 AM
  4. low level I/O
    By Saya in forum C Programming
    Replies: 6
    Last Post: 01-21-2004, 01:06 PM
  5. Overlapped I/O and Completion Port :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 10-30-2002, 04:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21