-
Notifications
You must be signed in to change notification settings - Fork 43
Check 04 copy directory
Lizaveta edited this page Dec 7, 2023
·
4 revisions
Description of the cross-check process 04-copy-directory:
- Check the code for the presence of synchronous methods of the fs module (you can use the
ctrl/cmd + fkey combination and enterSyncin 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.jsfile for the presence of the experimental function fsPromises.cp(). If this function is used, the task is considered not completed - 0 points. - Open the
filesfolder 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-directoryfolder for the presence of the createdfiles-copyfolder with an exact copy of the content of the originalfilesfolder.
If this folder is missing or its content does not match the content of thefilesfolder, the task is considered not completed - 0 points. - Add several new files to the
filesfolder and delete one of the previously existing ones. Run the commandnode 04-copy-directory. - Ensure that the content of the
files-copyfolder is updated and corresponds to the content of thefilesfolder. If an error occurred during execution or the state of thefiles-copyfolder was not updated, the task is considered not completed - 0 points.
If all points are successfully checked, 20 points are awarded for the task.