Sha256: 16ddd40d88cd4c88593d8d47a7ac0c60089ab8e0c7dc840473221093b89b0808
Contents?: true
Size: 603 Bytes
Versions: 95
Compression:
Stored size: 603 Bytes
Contents
class KuberKit::Tools::FilePresenceChecker FileNotFound = Class.new(KuberKit::Error) include KuberKit::Import[ "shell.local_shell" ] def check_file!(file_path) unless file_exists?(file_path) raise FileNotFound, "File not found at path: #{file_path}" end true end def file_exists?(file_path) local_shell.file_exists?(file_path) end def check_dir!(dir_path) unless dir_exists?(dir_path) raise FileNotFound, "Directory not found at path: #{dir_path}" end true end def dir_exists?(dir_path) local_shell.dir_exists?(dir_path) end end
Version data entries
95 entries across 95 versions & 1 rubygems