Module: File::Write

Included in:
File
Defined in:
lib/vex/base/filesystem/write.rb

Defined Under Namespace

Modules: Etest

Instance Method Summary collapse

Instance Method Details

#touch(*files) ⇒ Object



2
3
4
5
6
7
# File 'lib/vex/base/filesystem/write.rb', line 2

def touch(*files)
  files.each do |file|
    File.open(file, "w") do |f|
    end
  end
end

#write(path, data) ⇒ Object



9
10
11
12
13
14
# File 'lib/vex/base/filesystem/write.rb', line 9

def write(path, data)
  File.open(path, "w+") do |file|
    file.write(data)
  end
  path
end