Class: RXFReadWrite

Inherits:
RXFReader
  • Object
show all
Defined in:
lib/rxfreadwrite.rb

Class Method Summary collapse

Class Method Details

.glob(s) ⇒ Object



72
73
74
75
76
77
78
79
80
# File 'lib/rxfreadwrite.rb', line 72

def self.glob(s)

  if s[/^dfs:\/\//] then
    DfsFile.glob(s)
  else
    Dir.glob(s)
  end

end

.write(location, s = nil) ⇒ Object



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/rxfreadwrite.rb', line 81

def self.write(location, s=nil)

  case location
  when /^dfs:\/\//

    DfsFile.write location, s

  else

    if DfsFile.exists?(File.dirname(location)) then
      DfsFile.write location, s
    else
      File.write(location, s)
    end

  end

end