= General Usage of Folio Link Object Require the Folio library. require 'folio' Instantiate a soft link. @foo = Folio.file('fixtures/foo_softlink.txt') It is a link. @foo.link?.assert == true It is equal to a link defined identically. @foo.assert == Folio.file('fixtures/foo_softlink.txt') The link is not equal to the target document. @foo.assert! == Folio.file('fixtures/foo.txt') But it is equal to a same link instantiated from a differnt working directory. f = nil Dir.chdir('fixtures') do f = Folio.file('foo_softlink.txt') end @foo.assert == f Reads the linked document correctly. @foo.read == "THIS IS FOO!" Opens the linked document for reading. t = nil @foo.open('r'){ |f| t = f.read } t.assert == "THIS IS FOO!\n" It provides the parent directory object. @foo.parent.assert == Folio.dir('fixtures')