Class Origami::Filename
In: sources/parser/file.rb
Parent: Object

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

Methods

DOS   Mac   Unix  

Public Class methods

Converts Windows file path into PDF file path.

[Source]

     # File sources/parser/file.rb, line 90
 90:       def DOS(file)
 91:         path = ""
 92:         # Absolute vs relative path
 93:         if file.include? ":"
 94:           path << "/"
 95:           file.sub!(":","")
 96:         end
 97:         
 98:         file.gsub!("\\", "/")
 99:         ByteString.new(path + file)
100:       end

Converts MacOS file path into PDF file path.

[Source]

    # File sources/parser/file.rb, line 83
83:       def Mac(file)
84:         ByteString.new("/" + file.gsub(":", "/"))
85:       end

Converts UNIX file path into PDF file path.

[Source]

    # File sources/parser/file.rb, line 76
76:       def Unix(file)
77:         ByteString.new(file)
78:       end

[Validate]