Sha256: e8ca4d7e17aec4186a236f3e4b31b9215e3816fde751f4ebcb050b7c457381d4

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

require 'fileutils'
require 'folio/errors'
require 'folio/shell'
require 'folio/fileobject'
require 'folio/directory'
require 'folio/document'
require 'folio/link'
require 'folio/device'
require 'folio/socket'
require 'folio/pipe'

#def folio(path)
#  Folio.new(path)
#end

# = Folio
#
# In folio the term `file` means a file object. That is to say any
# type of file system resource: document, directory, device, etc.
# We use the term `document` instead to mean "regular files".
# This terminolgy was chosen for two reasons. Namely, (1) a 
# differentiation in terms was required; and (2) a file in the
# everyday sense is something in which one puts papars
# (eg. documents).

module Folio
  VERSION = "" # <-/= "#{version}"/

  #
  def self.shell(*path)
    Shell.new(*path)
  end

  #
  def self.file(*path)
    FileObject[*path]
  end

  #
  def self.doc(path)
    Folio::Document.new(path)
  end

  #
  def self.dir(path)
    Folio::Directory.new(path)
  end

  class << self
    # Should we have this? 
    # Perhaps Folio should be the Shell class?
    #alias_method :new, :shell

    # Should #[] be alias for #file instead?
    #alias_method :[], :shell ???
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
folio-0.4.0 lib/folio.rb