class Webgen::Destination::FileSystem

This class uses the file systems as output device. On initialization a root path is set and all other operations are taken relative to this root path.

Attributes

root[R]

The root path, ie. the path to which the root node gets rendered.

Public Class Methods

new(website, root)

Create a new FileSystem object with the given root path. If root is not absolute, it is taken relative to the website directory.

Public Instance Methods

delete(path)

Delete the given path

exists?(path)

Return true if the given path exists.

read(path, mode = 'rb')

Return the content of the given path which is opened in mode.

write(path, data)

Write the data to the given path.