Parent

Methods

Class/Module Index [+]

Quicksearch

Webgen::Source::FileSystem::Path

A special Webgen::Path class for handling with file system paths.

Public Class Methods

new(path, fs_path) click to toggle source

Create a new object with absolute path path for the file system path fs_path.

# File lib/webgen/source/filesystem.rb, line 15
def initialize(path, fs_path)
  super(path) {|mode| File.open(fs_path, mode) }
  @fs_path = fs_path
  WebsiteAccess.website.cache[[:fs_path, @fs_path]] = File.mtime(@fs_path)
  @meta_info['modified_at'] = File.mtime(@fs_path)
end

Public Instance Methods

changed?() click to toggle source

Return true if the file system path used by the object has been modified.

# File lib/webgen/source/filesystem.rb, line 23
def changed?
  data = WebsiteAccess.website.cache[[:fs_path, @fs_path]]
  File.mtime(@fs_path) > data
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.