-
Notifications
You must be signed in to change notification settings - Fork 30
Check 04 copy directory
Description of the cross-check process 04-copy-directory:
Video with the example of cross-check
-
Check the code for the presence of synchronous methods of the fs module (you can use the
ctrl/cmd + f
key combination and enterSync
in the search field that appears) and setTimeout().
If synchronous methods or a timer are used, the task is considered not completed - 0 points. -
Check the
index.js
file for the presence of the experimental function fsPromises.cp().
If this function is used, the task is considered not completed - 0 points. -
Open the
files
folder and make sure it is not empty. Otherwise, create several files at your discretion. -
In the root directory of the repository, execute the command
node 04-copy-directory
. -
After the script execution is complete, check the
04-copy-directory
folder for the presence of the createdfiles-copy
folder with an exact copy of the content of the originalfiles
folder.
If this folder is missing or its content does not match the content of thefiles
folder, the task is considered not completed - 0 points. -
Add several new files to the
files
folder and delete one of the previously existing ones. Run the commandnode 04-copy-directory
. -
Ensure that the content of the
files-copy
folder is updated and corresponds to the content of thefiles
folder.
If an error occurred during execution or the state of thefiles-copy
folder was not updated, the task is considered not completed - 0 points.
If all points are successfully checked, 20 points are awarded for the task.