From 616d3b3b9f51ff435ab40a8b6d877900ac47d108 Mon Sep 17 00:00:00 2001
From: Caleb Sander <caleb.sander@gmail.com>
Date: Sat, 27 Feb 2021 13:04:32 -0500
Subject: [PATCH] Fix #6

---
 specs/mini-vc/mini-vc.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/specs/mini-vc/mini-vc.md b/specs/mini-vc/mini-vc.md
index dd39ede..750f262 100644
--- a/specs/mini-vc/mini-vc.md
+++ b/specs/mini-vc/mini-vc.md
@@ -264,6 +264,19 @@ Note that these functions expect diffs in the form of `FileDiffs` objects, which
 
 You don't need to understand the code behind these functions, but I think the diffing algorithm is really cool, so please ask me if you want to know more!
 
+## Filesystem functions
+
+Node.js provides an extensive set of functions for filesystem operations (reading and writing files, adding and removing directories, etc.).
+The full set of functions can be found in the [documentation for the `fs` module](https://nodejs.org/api/fs.html).
+All the functions have versions (in `require('fs').promises`, referred to by the documentation as `fsPromises`) that return `Promise`s, which are convenient to use with `async`-`await`.
+The callback versions of the functions have better examples of what arguments you can pass, so I recommend reading their documentation.
+
+Here are the filesystem operations I used, but you are welcome to use others:
+- [`fsPromises.access()`](https://nodejs.org/api/fs.html#fs_fspromises_access_path_mode): checks whether a file exists (the `Promise` will reject if it doesn't)
+- [`fsPromises.mkdir()`](https://nodejs.org/api/fs.html#fs_fspromises_mkdir_path_options): makes a new (empty) directory
+- [`fsPromises.readFile()`](https://nodejs.org/api/fs.html#fs_fspromises_readfile_path_options): reads the entire contents of a file as bytes or as a string (if you use encoding `'utf8'`)
+- [`fsPromises.writeFile()`](https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options): sets the contents of a file, creating the file if it doesn't exist
+
 ## Going further
 
 If you are interested and want to add more to the VC project, try adding support for "branches".
-- 
GitLab