Exception: Nanoc::Extra::FilesystemTools::UnsupportedFileTypeError Private

Inherits:
Nanoc::Errors::GenericTrivial show all
Defined in:
lib/nanoc/extra/filesystem_tools.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Error that is raised when a file of an unknown type is encountered (something other than file, directory or link).

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (UnsupportedFileTypeError) initialize(filename)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of UnsupportedFileTypeError

Parameters:

  • filename (String)

    The filename of the file whose type is not supported



34
35
36
37
# File 'lib/nanoc/extra/filesystem_tools.rb', line 34

def initialize(filename)
  @filename = filename
  super("The file at #{filename} is of an unsupported type (expected file, directory or link, but it is #{File.ftype(filename)}")
end

Instance Attribute Details

- (String) filename (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The filename of the file whose type is not supported

Returns:

  • (String)

    The filename of the file whose type is not supported



30
31
32
# File 'lib/nanoc/extra/filesystem_tools.rb', line 30

def filename
  @filename
end