It's UWAweek 9 (1st semester, week 1)


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 1168 articles.
Currently 1 other person reading this forum.

 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

12:46pm Tue 3rd Oct, Christopher M.

"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.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy