Class: Fastlane::Actions::DeleteFilesAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::DeleteFilesAction
- Defined in:
- lib/fastlane/plugin/delete_files/actions/delete_files_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
22 23 24 |
# File 'lib/fastlane/plugin/delete_files/actions/delete_files_action.rb', line 22 def self. ["Gary Johnson"] end |
.available_options ⇒ Object
26 27 28 29 30 31 |
# File 'lib/fastlane/plugin/delete_files/actions/delete_files_action.rb', line 26 def self. [ FastlaneCore::ConfigItem.new(key: :file_pattern, description: "Glob file pattern to search for files to delete") ] end |
.description ⇒ Object
18 19 20 |
# File 'lib/fastlane/plugin/delete_files/actions/delete_files_action.rb', line 18 def self.description "Deletes a file, folder or multiple files using shell glob pattern." end |
.is_supported?(platform) ⇒ Boolean
33 34 35 |
# File 'lib/fastlane/plugin/delete_files/actions/delete_files_action.rb', line 33 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fastlane/plugin/delete_files/actions/delete_files_action.rb', line 7 def self.run(params) matching_files = Dir.glob(params[:file_pattern]) unless matching_files.any? UI. "No files found matching pattern \"#{params[:file_pattern]}\"" return end File.delete(*matching_files) UI. "Deleted files: #{matching_files.join(", ")}" end |