On each platform the mechanism of file i/o can be extended registering "U8 volumes" that are low-level handlers of pathNames and accessors to contents in native files/folders. |
u8: | The volume in path will be expanded to access U8 service at profile root. e.g. the expression'u8:aleReimondo/' fileContentswill return contents of page in the U8 service at http://u8.smalltalking.net/profile/aleReimondo/ |
swiki: | The volume in path will be expanded to access our community swiki server. e.g. the expression'swiki:U8/.pages' fileContentswill return the index of pages in this swiki |
U8 volumes at: #code put: [:path :key| | cls driver | cls := Smalltalk at: path ifAbsent: []. driver := PoolDictionary new. driver at: #fileWrite:mode: put: [:aString :mode| aString stream fileInto: cls ]; at: #contentsDo:timeout: put: [:aBlock :timeout| aBlock evaluateWith: cls fileOut ]; at: #asyncContentsDo:timeout: put: [:aBlock :timeout| self error: 'Not async i/o implemented' ]; yourself ] |
'code:Point' fileContents |