Sha256: f9a55ae85302d5eda532a29fa6fd00eea92029728641af9c94cc0e072decd2e0

Contents?: true

Size: 818 Bytes

Versions: 38

Compression:

Stored size: 818 Bytes

Contents

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

    def check_owner(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

38 entries across 38 versions & 1 rubygems

Version Path
specinfra-2.0.1 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta52 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta51 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta50 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta49 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta48 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta47 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta46 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta45 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta44 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta43 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta42 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta41 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta40 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta39 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta38 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta37 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta36 lib/specinfra/command/freebsd/base/file.rb
specinfra-2.0.0.beta35 lib/specinfra/command/freebsd/base/file.rb