files.com 1.1.774 → 1.1.775

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4f2c94de7f8460dbc6ebdc3ebfe0d3acac9e51a73ba8e8bb1b6fdeb4c209cf2
4
- data.tar.gz: 021a97a67cc851eda338a4648d23fd98123062630359ffe889c6d5ce4621c624
3
+ metadata.gz: d4c219d136b284a59d807f0457203b8c9cea7dfc0a2e816df7be244d5a063546
4
+ data.tar.gz: 92418b15c3786ca448d176d68a3e1d2a9a16e1a9c69a0c8713642e37c87b7f74
5
5
  SHA512:
6
- metadata.gz: 34e69220a7b56baed94b097b29f252091b878d09bbc8c18d2c48b814d4621242f387a678e556ec2649ea47d5f0afbbc657f18795823bbd0547e78c28d0b43c86
7
- data.tar.gz: 0130c0988d60aeee05ea50a51ba9289434e336c6dbbb6a34532462fcc4d52a2a00fd869446428d3bd84b06851436784ed5377de1519bf960045ebcb50930dc9c
6
+ metadata.gz: aa90b8947359abecb1f93143a999a5816d291bba7d3087966baaaa695acc90f02a4c0d5b73ebbd7a34c93f831d815809995b6f977159ffeb74573169236adeb2
7
+ data.tar.gz: c160181dd3b0241c69b86a86d11afb2f2a73a83f3c17c8ac913aabea1d9c5307981c267f7f8dd01839924591cdeefde9f522127938d71df3217ba0b6df26c7b2
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.774
1
+ 1.1.775
data/docs/file.md CHANGED
@@ -282,6 +282,22 @@ Files::File.zip_list_contents(path)
282
282
  * `path` (string): Required - Path to operate on.
283
283
 
284
284
 
285
+ ---
286
+
287
+ ## Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
288
+
289
+ ```
290
+ Files::File.begin_delete(path,
291
+ recursive: false
292
+ )
293
+ ```
294
+
295
+ ### Parameters
296
+
297
+ * `path` (string): Required - Path to operate on.
298
+ * `recursive` (boolean): If true, will recursively delete folders. Otherwise, will error on non-empty folders.
299
+
300
+
285
301
  ---
286
302
 
287
303
  ## Copy File/Folder
@@ -548,6 +564,24 @@ file.zip_list_contents
548
564
  * `path` (string): Required - Path to operate on.
549
565
 
550
566
 
567
+ ---
568
+
569
+ ## Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
570
+
571
+ ```
572
+ file = Files::File.find(path)
573
+
574
+ file.begin_delete(
575
+ recursive: false
576
+ )
577
+ ```
578
+
579
+ ### Parameters
580
+
581
+ * `path` (string): Required - Path to operate on.
582
+ * `recursive` (boolean): If true, will recursively delete folders. Otherwise, will error on non-empty folders.
583
+
584
+
551
585
  ---
552
586
 
553
587
  ## Copy File/Folder
data/docs/file_action.md CHANGED
@@ -10,4 +10,4 @@
10
10
  ```
11
11
 
12
12
  * `status` (string): Status of file operation.
13
- * `file_migration_id` (int64): If status is pending, this is the id of the File Migration to check for status updates.
13
+ * `file_migration_id` (int64): If status is pending, this is the id of the File Migration to check for status updates. Delete actions include it whenever the deletion runs as a File Migration, including while it is processing.
@@ -1145,6 +1145,20 @@ module Files
1145
1145
  Api.send_request("/file_actions/zip_list/#{@attributes[:path]}", :get, params, @options)
1146
1146
  end
1147
1147
 
1148
+ # Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
1149
+ #
1150
+ # Parameters:
1151
+ # recursive - boolean - If true, will recursively delete folders. Otherwise, will error on non-empty folders.
1152
+ def begin_delete(params = {})
1153
+ params ||= {}
1154
+ params[:path] = @attributes[:path]
1155
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1156
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1157
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1158
+
1159
+ Api.send_request("/file_actions/delete/#{@attributes[:path]}", :post, params, @options)
1160
+ end
1161
+
1148
1162
  # Copy File/Folder
1149
1163
  #
1150
1164
  # Parameters:
@@ -1466,6 +1480,25 @@ module Files
1466
1480
  end
1467
1481
  end
1468
1482
 
1483
+ # Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
1484
+ #
1485
+ # Parameters:
1486
+ # recursive - boolean - If true, will recursively delete folders. Otherwise, will error on non-empty folders.
1487
+ #
1488
+ # params:: Hash of API operation parameter values.
1489
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
1490
+ #
1491
+ # Returns a Files::FileAction.
1492
+ def self.begin_delete(path, params = {}, options = {})
1493
+ params ||= {}
1494
+ params[:path] = path
1495
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1496
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1497
+
1498
+ response, options = Api.send_request("/file_actions/delete/#{params[:path]}", :post, params, options) { |reply| reply.require_object("FileAction") }
1499
+ FileAction.new(response.data, options)
1500
+ end
1501
+
1469
1502
  # Copy File/Folder
1470
1503
  #
1471
1504
  # Parameters:
@@ -14,7 +14,7 @@ module Files
14
14
  @attributes[:status]
15
15
  end
16
16
 
17
- # int64 - If status is pending, this is the id of the File Migration to check for status updates.
17
+ # int64 - If status is pending, this is the id of the File Migration to check for status updates. Delete actions include it whenever the deletion runs as a File Migration, including while it is processing.
18
18
  def file_migration_id
19
19
  @attributes[:file_migration_id]
20
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.774"
4
+ VERSION = "1.1.775"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.774
4
+ version: 1.1.775
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-10 00:00:00.000000000 Z
11
+ date: 2026-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable