Module: DSL::RoFile

Included in:
RoCommands::Info
Defined in:
lib/dsl/ro_file.rb

Instance Method Summary collapse

Instance Method Details

#dir?(path) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/dsl/ro_file.rb', line 5

def dir?(path)
  test(?d, path)
end

#file?(path) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/dsl/ro_file.rb', line 9

def file?(path)
  test(?f, path)

end

#find(path) ⇒ Object



14
15
16
# File 'lib/dsl/ro_file.rb', line 14

def find(path)
  Find.find(path).to_a
end

#size(path) ⇒ Object



18
19
20
21
# File 'lib/dsl/ro_file.rb', line 18

def size(path)
  s = test(?s, path)
  s ||= 0
end