diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-01 17:04:37 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-01 17:04:37 -0800 |
commit | 2a4088119cf41175457414dfa59bd4064b8f0562 (patch) | |
tree | 64fe184e399f9870ebd481a90eec34d51e5dff68 /archive/2.vm/filesystem.mu | |
parent | 23fd294d85959c6b476bcdc35ed6ad508cc99b8f (diff) | |
download | mu-2a4088119cf41175457414dfa59bd4064b8f0562.tar.gz |
5852
Diffstat (limited to 'archive/2.vm/filesystem.mu')
-rw-r--r-- | archive/2.vm/filesystem.mu | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/archive/2.vm/filesystem.mu b/archive/2.vm/filesystem.mu deleted file mode 100644 index 6ea8e08c..00000000 --- a/archive/2.vm/filesystem.mu +++ /dev/null @@ -1,20 +0,0 @@ -# example program: copy one file into another, character by character -# BEWARE: this will modify your file system -# before running it, put some text into /tmp/mu-x -# after running it, check /tmp/mu-y - -def main [ - local-scope - source-file:&:source:char <- start-reading null/real-filesystem, [/tmp/mu-x] - sink-file:&:sink:char, write-routine:num <- start-writing null/real-filesystem, [/tmp/mu-y] - { - c:char, done?:bool, source-file <- read source-file - break-if done? - sink-file <- write sink-file, c - loop - } - close sink-file - # make sure to wait for the file to be actually written to disk - # (Mu practices structured concurrency: http://250bpm.com/blog:71) - wait-for-routine write-routine -] |