It's UWAweek 30 (2nd semester, week 1)

help2002

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 7 other people reading this forum.


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

Login to reply

👍x1
helpful
5:15pm Tue 3rd Oct, Christopher M.

ANONYMOUS wrote:
> Let's say that in the two directories that we would like to sync (dir1, dir2), dir1 has 1 file called X, while dir2 is empty. > By the project's description, I understand that after mysync.c is ran, dir1 will be unchanged and dir2 will now also include the file X.
Yes, that is correct.
> However, when I think of the goal of the project as trying to synchronise two directories and hold the most up to date information, isn't it possible that initially both directories were full (with file X), I then delete X from dir2 (making it empty),and I then run the mysync program with the goal of synchronising my recent changes. Wouldnt it make more sense in that case for mysync.c to delete X file from dir1, to make both the directories empty? Rather than just copying X into dir2 which brings us back to where we started (reverting my initial changes rather than synchronising).
The goal is to synchronise the files (in indicated directories), not to synchronise directories. But your storyline doesn't make sense - we have no way of knowing what dir1 and dir2 *used* to have, or how they came to be that way. We only know that dir1 contains X, and that dir2 is empty. We have no way of knowing that dir2 ever held anything. The project does not involve deleting anything, only (possibly) adding files to each directory. The word we discussed in today's CatchUp session was 'union'.

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  7:24AM Jul 25 2024
Privacy policy