Sha256: 106269aa505fa9c7c0731ed45995d795f02f03e99c1bc9b00aba8857b654408f

Contents?: true

Size: 827 Bytes

Versions: 112

Compression:

Stored size: 827 Bytes

Contents

class Specinfra::Command::Freebsd::Base::File < Specinfra::Command::Base::File
  class << self
    def check_is_grouped(file, group)
      regexp = "^#{group}$"
      "stat -f%Sg #{escape(file)} | grep -- #{escape(regexp)}"
    end

    def check_is_owned_by(file, owner)
      regexp = "^#{owner}$"
      "stat -f%Su #{escape(file)} | grep -- #{escape(regexp)}"
    end

    def check_has_mode(file, mode)
      regexp = "^#{mode}$"
      "stat -f%Lp #{escape(file)} | grep -- #{escape(regexp)}"
    end

    def get_mode(file)
      "stat -f%Lp #{escape(file)}"
    end

    def check_is_linked_to(link, target)
      "stat -f%Y #{escape(link)} | grep -- #{escape(target)}"
    end

    def get_mtime(file)
      "stat -f%m #{escape(file)}"
    end

    def get_size(file)
      "stat -f%z #{escape(file)}"
    end
  end
end

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
specinfra-2.34.6 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.34.5 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.34.4 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.34.3 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.34.2 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.34.1 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.34.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.33.1 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.33.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.32.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.31.1 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.31.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.30.4 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.30.3 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.30.2 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.30.1 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.30.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.29.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.28.4 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.28.3 lib/specinfra/command/freebsd/base/file.rb