File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,7 +202,8 @@ theorem create_unlink_is_cno (p : Path) (fs : Filesystem) (h : noFileAt p fs) :
202202 unfold createUnlinkOp
203203 exact create_unlink_inverse p fs h
204204
205- /-- read followed by write. `noncomputable` — wraps axioms. -/
205+ /-- Write the content returned by `readFile` back to `p`, leaving the filesystem
206+ unchanged if `readFile` returns `none`. `noncomputable` — wraps axioms. -/
206207noncomputable def readWriteOp (p : Path) : FsOp :=
207208 fun fs =>
208209 match readFile p fs with
@@ -218,7 +219,8 @@ theorem read_write_is_cno (p : Path) :
218219 | some content =>
219220 exact read_write_identity p fs content h
220221
221- /-- chmod to current permissions. `noncomputable` — wraps axioms. -/
222+ /-- Set permissions at `p` to those returned by `stat`, leaving the filesystem
223+ unchanged if `stat` returns `none`. `noncomputable` — wraps axioms. -/
222224noncomputable def chmodNopOp (p : Path) : FsOp :=
223225 fun fs =>
224226 match stat p fs with
@@ -323,6 +325,8 @@ axiom snapshot_restore_identity (fs : Filesystem) :
323325
324326-- `noncomputable` because `restore` and `snapshot` are axioms with no
325327-- executable body; without this Lean 4.16 refuses to emit code for `def`.
328+ /-- Restore a snapshot of the input filesystem onto that same filesystem.
329+ Returns the input filesystem by `snapshot_restore_identity`. -/
326330noncomputable def snapshotRestoreOp : FsOp :=
327331 fun fs => restore (snapshot fs) fs
328332
You can’t perform that action at this time.
0 commit comments