Class: Specinfra::Command::Smartos::Base::File

Inherits:
Specinfra::Command::Solaris::Base::File show all
Defined in:
lib/specinfra/command/smartos/base/file.rb

Class Method Summary collapse

Methods inherited from Specinfra::Command::Solaris::Base::File

check_contains_within, check_is_accessible_by_user

Methods inherited from Base::File

change_group, change_mode, change_owner, check_contains, check_contains_lines, check_contains_with_fixed_strings, check_contains_with_regexp, check_contains_within, check_exists, check_has_mode, check_is_directory, check_is_file, check_is_grouped, check_is_link, check_is_linked_to, check_is_mounted, check_is_owned_by, check_is_pipe, check_is_socket, check_is_symlink, copy, create_as_directory, get_content, get_link_target, get_mode, get_mtime, get_owner_group, get_owner_user, get_size, link_to, move, remove

Methods inherited from Base

create, escape

Class Method Details

.get_md5sum(file) ⇒ Object


3
4
5
# File 'lib/specinfra/command/smartos/base/file.rb', line 3

def get_md5sum(file)
  "/usr/bin/digest -a md5 -v #{escape(file)} | cut -d '=' -f 2 |  cut -c 2-"
end

.get_sha256sum(file) ⇒ Object


7
8
9
# File 'lib/specinfra/command/smartos/base/file.rb', line 7

def get_sha256sum(file)
  "/usr/bin/digest -a sha256 -v #{escape(file)} | cut -d '=' -f 2 |  cut -c 2-"
end