Module: RoCommands::DSL::RoFile

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

Instance Method Summary collapse

Instance Method Details

#dir?(path) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#file?(path) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#find(path) ⇒ Object



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

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

#size(path) ⇒ Object



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

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