about summary refs log blame commit diff stats
path: root/filesystem.mu
blob: 274397be7cc0418f4d52adb8b76eac73df724ec6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

             
                                                         






                                                                           
                              

        
                                   

                         
def main [
  local-scope
  $print [reading characters from /tmp/mu-fs], 10/newline
  # initialize filesystem
  fs:address:filesystem <- copy 0/real-filesystem
  content-source:address:source:character <- start-reading fs, [/tmp/mu-fs]
  # read from channel until exhausted and print out characters
  {
    c:character, done?:boolean, content-source <- read content-source
    break-if done?
    $print [  ], c, 10/newline
    loop
  }
  $print [done reading], 10/newline
  # TODO: writing to file
]