Skip to content

Commit

Permalink
Add size method to file type
Browse files Browse the repository at this point in the history
  • Loading branch information
hirose31 committed Jun 11, 2014
1 parent 528637c commit c03f67b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/serverspec/type/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def mtime
d = backend.get_file_mtime(@name).stdout.strip
DateTime.strptime(d, '%s')
end

def size
backend.get_file_size(@name).stdout.strip.to_i
end
end
end
end

0 comments on commit c03f67b

Please sign in to comment.