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

 UWA week 42 (2nd semester, week 12) ↓
SVG not supported

Login to reply

5:35am Sun 15th Oct, Christopher M.

> Initially my approach did do a lot of unnecessary work, but I fixed it by having a growing array of all the files that have been synced already, so that when scanning other directories, its not re-synced.
I can see that the outcomes should be the same - you make the file copies, and then extend a dynamic data-structure to remember what has been performed. In contrast, the sample solution builds its dynamic data-structure to define what it will copy, and then performs all the activities recorded in it structure.
> And yes it did lead to an infinite sequence of directories, but only when syncing a directory with it's child. We can't (yet) see what the sample solution does in such a situation right? Because it treats each individual zipped file as it's own top level dir.
The sample solution successfully recursively syncs directories and their (embedded) child directories *because* it works out what to copy before it starts copying, and does not continue 'processing' the newly created directories.

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