"Jacob Read" <23*7*9*
6@s*u*e*t*u*a*e*u*a*> wrote:
> Of course. I'm using recursion to move through and create subdirectories if necessary, and then running the sync directories function on those subdirectories. The main point was there become problems if there is a subdirectory that shares the name of a file in another directory. As this will cause issues with trying to sync either the file, as it can't be moved over to the directory containing the same name subdirectory. And obviously it will cause issues with trying to sync directories, as the file can't be treated as a directory, and its parent directory can't create a subdirectory with the same name.
As stated in the project description, anything that cannot be performed is an error, and as soon the first error is detected, your program should report the error and terminate. The system-calls will provaide all necessary support to detect/report that you cannot create a new file where an existing directory of the same name exists.
Another important clarification is whether the file contents are looked at. If two files have the same contents, but different modification times, will the most recent one still overwrite the older one?
No, we don't lokk at file's contents (how can you tell which is the more recent content?).
Already answered in part here:
[help2002]⬈
> Also, a new question. Should directories have their time and permissions synced as well, if the appropriate flag is specified, or does it only apply to files?
No, just the files. You'd find this difficult to manage, unless you make a second 'sweep' over everything, as each time you add a file to a directory, the directory's modtime will change.