Class: KuberKit::Tools::FilePresenceChecker
- Defined in:
- lib/kuber_kit/tools/file_presence_checker.rb
Constant Summary collapse
Instance Method Summary collapse
- #check_dir!(dir_path) ⇒ Object
- #check_file!(file_path) ⇒ Object
- #dir_exists?(dir_path) ⇒ Boolean
- #file_exists?(file_path) ⇒ Boolean
Instance Method Details
#check_dir!(dir_path) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/kuber_kit/tools/file_presence_checker.rb', line 19 def check_dir!(dir_path) unless dir_exists?(dir_path) raise FileNotFound, "Directory not found at path: #{dir_path}" end true end |
#check_file!(file_path) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/kuber_kit/tools/file_presence_checker.rb', line 8 def check_file!(file_path) unless file_exists?(file_path) raise FileNotFound, "File not found at path: #{file_path}" end true end |
#dir_exists?(dir_path) ⇒ Boolean
26 27 28 |
# File 'lib/kuber_kit/tools/file_presence_checker.rb', line 26 def dir_exists?(dir_path) local_shell.dir_exists?(dir_path) end |
#file_exists?(file_path) ⇒ Boolean
15 16 17 |
# File 'lib/kuber_kit/tools/file_presence_checker.rb', line 15 def file_exists?(file_path) local_shell.file_exists?(file_path) end |