Created
November 6, 2009 16:10
-
-
Save faultier/228067 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# filetype=ruby fileencoding=utf8 | |
framework 'MacFUSE' | |
class NamakeFS | |
STRING = '寒いので冬眠したい' | |
PATH = '/honne.txt' | |
def contentsOfDirectoryAtPath(path, error:error) | |
return [ PATH.lastPathComponent ] | |
end | |
def contentsAtPath(path) | |
if path == PATH | |
STRING.dataUsingEncoding(NSUTF8StringEncoding) | |
end | |
end | |
end | |
filesystem = GMUserFileSystem.alloc.initWithDelegate(NamakeFS.new, isThreadSafe:false) | |
filesystem.mountAtPath('/Volumes/NamakeFS', withOptions:['rdonly', 'volname=NamakeFS']) | |
NSRunLoop.currentRunLoop.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment