diff options
Diffstat (limited to 'stdlib/source/library/lux/world/file.lux')
-rw-r--r-- | stdlib/source/library/lux/world/file.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stdlib/source/library/lux/world/file.lux b/stdlib/source/library/lux/world/file.lux index 19dde66f4..b0ae0d400 100644 --- a/stdlib/source/library/lux/world/file.lux +++ b/stdlib/source/library/lux/world/file.lux @@ -1045,7 +1045,7 @@ #.None (case tail #.End - (#try.Success (dictionary.put head + (#try.Success (dictionary.has head (#.Left {#mock_last_modified now #mock_can_execute false #mock_content content}) @@ -1057,7 +1057,7 @@ (#.Some node) (case [node tail] [(#.Left file) #.End] - (#try.Success (dictionary.put head + (#try.Success (dictionary.has head (#.Left (|> file (set@ #mock_last_modified now) (set@ #mock_content content))) @@ -1066,7 +1066,7 @@ [(#.Right sub_directory) (#.Item _)] (do try.monad [sub_directory (recur sub_directory tail)] - (in (dictionary.put head (#.Right sub_directory) directory))) + (in (dictionary.has head (#.Right sub_directory) directory))) _ (exception.except ..cannot_find_file [path]))) @@ -1089,11 +1089,11 @@ #.End (case node (#.Left file) - (#try.Success (dictionary.remove head directory)) + (#try.Success (dictionary.lacks head directory)) (#.Right sub_directory) (if (dictionary.empty? sub_directory) - (#try.Success (dictionary.remove head directory)) + (#try.Success (dictionary.lacks head directory)) (exception.except ..cannot_delete [path]))) (#.Item _) @@ -1104,7 +1104,7 @@ (#.Right sub_directory) (do try.monad [sub_directory' (recur sub_directory tail)] - (in (dictionary.put head (#.Right sub_directory') directory)))))) + (in (dictionary.has head (#.Right sub_directory') directory)))))) #.End (exception.except ..cannot_delete [path])))) @@ -1132,7 +1132,7 @@ #.None (case tail #.End - (#try.Success (dictionary.put head (#.Right ..empty_mock) directory)) + (#try.Success (dictionary.has head (#.Right ..empty_mock) directory)) (#.Item _) (exception.except ..cannot_make_directory [path])) @@ -1142,7 +1142,7 @@ [(#.Right sub_directory) (#.Item _)] (do try.monad [sub_directory (recur sub_directory tail)] - (in (dictionary.put head (#.Right sub_directory) directory))) + (in (dictionary.has head (#.Right sub_directory) directory))) _ (exception.except ..cannot_make_directory [path]))) |