Parent

Methods

Class/Module Index [+]

Quicksearch

Origami::Filename

Class used to convert system-dependent pathes into PDF pathes. PDF path specification offers a single form for representing file pathes over operating systems.

Public Class Methods

DOS(file) click to toggle source

Converts Windows file path into PDF file path.

# File lib/origami/file.rb, line 127
def DOS(file)
  path = ""
  # Absolute vs relative path
  if file.include? ":"
    path << "/"
    file.sub!(":","")
  end
  
  file.gsub!("\\", "/")
  ByteString.new(path + file)
end
Mac(file) click to toggle source

Converts MacOS file path into PDF file path.

# File lib/origami/file.rb, line 120
def Mac(file)
  ByteString.new("/" + file.gsub(":", "/"))
end
Unix(file) click to toggle source

Converts UNIX file path into PDF file path.

# File lib/origami/file.rb, line 113
def Unix(file)
  ByteString.new(file)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.