class Chef::Resource::File::Verification

See RFC 027 for a full specification

File verifications allow user-supplied commands a means of preventing file resource content deploys. Their intended use is to verify the contents of a temporary file before it is deployed onto the system.

Similar to not_if and only_if, file verifications can take a ruby block, which will be called, or a string, which will be executed as a Shell command.

Additionally, Chef or third-party verifications can ship “registered verifications” that the user can use by specifying a :symbol as the command name.

To create a registered verification, create a class that inherits from Chef::Resource::File::Verification and use the provides class method to give it name. Registered verifications are expected to supply a verify instance method that takes 2 arguments.

Example: class Chef

class Resource
  class File::Verification::Foo < Chef::Resource::File::Verification
    provides :noop
    def verify(path, opts)
      #yolo
      true
    end
  end
end

end