files.com 1.1.189 → 1.1.190
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 +4 -4
- data/README.md +4 -83
- data/_VERSION +1 -1
- data/lib/files.com/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f7eff38fb48b6a54e3e4288d73297895773ea269e43d58a0bb6f6673ff3434
|
4
|
+
data.tar.gz: 16be062ac45b18daa0f1c92f705575678bb1513d530247e2243d4802cbcb6615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae0c6000f9379de62263d6ef930171bc774997fa97efe6a12b2b20adab35d80e6893d37e21d70908a5d3b762d9a9fbd2436980e55b53df1dcf2210fd9a8e000d
|
7
|
+
data.tar.gz: ff19bedcea913e09675fb2612169e20a5b173a46b7cdaaf53e829502fed76153f445e72c4460cab1d99f5be37d459c0fe755bbf815c48d973b8e870f24da1db5
|
data/README.md
CHANGED
@@ -38,6 +38,10 @@ The Files.com gem requires Ruby 3+.
|
|
38
38
|
Ruby 2.x is now considered end-of-life by the Ruby project. As a policy, Files.com does not support integrations which are considered end-of-life by their vendor.
|
39
39
|
|
40
40
|
Explore the [files-sdk-ruby](https://github.com/Files-com/files-sdk-ruby) code on GitHub.
|
41
|
+
The Files::File and Files::Dir models implement the standard Ruby API
|
42
|
+
for File and Dir, respectively. (Note that the Files.com SDK uses the
|
43
|
+
word Folder, not Dir, and Files::Dir is simply an alias for
|
44
|
+
Files::Folder).
|
41
45
|
|
42
46
|
### Getting Support
|
43
47
|
|
@@ -505,89 +509,6 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
505
509
|
The Files.com API compares files and paths in a case-insensitive manner.
|
506
510
|
For related documentation see [Case Sensitivity Documentation](https://www.files.com/docs/files-and-folders/file-system-semantics/case-sensitivity).
|
507
511
|
|
508
|
-
## Examples
|
509
|
-
|
510
|
-
The Files::File and Files::Dir models implement the standard Ruby API
|
511
|
-
for File and Dir, respectively. (Note that the Files.com SDK uses the
|
512
|
-
word Folder, not Dir, and Files::Dir is simply an alias for
|
513
|
-
Files::Folder).
|
514
|
-
|
515
|
-
### Upload
|
516
|
-
|
517
|
-
#### Upload a File
|
518
|
-
|
519
|
-
```ruby
|
520
|
-
Files::File.upload_file("local.txt", "remote.txt")
|
521
|
-
```
|
522
|
-
|
523
|
-
#### Upload Raw File Data
|
524
|
-
|
525
|
-
```ruby
|
526
|
-
File.open("local.txt") do |local_file|
|
527
|
-
Files::File.open("remote.txt", "w") do |remote_file|
|
528
|
-
remote_file.write(local_file.read)
|
529
|
-
end
|
530
|
-
end
|
531
|
-
```
|
532
|
-
|
533
|
-
#### Create a Folder
|
534
|
-
|
535
|
-
```ruby
|
536
|
-
Files::Folder.create("path/to/folder/to/be/created",
|
537
|
-
mkdir_parents: true
|
538
|
-
)
|
539
|
-
```
|
540
|
-
|
541
|
-
### Download
|
542
|
-
|
543
|
-
#### Download a File
|
544
|
-
|
545
|
-
```ruby
|
546
|
-
Files::File.download_file("remote.txt", "local.txt")
|
547
|
-
```
|
548
|
-
|
549
|
-
### List
|
550
|
-
|
551
|
-
#### List Folder Contents
|
552
|
-
|
553
|
-
```ruby
|
554
|
-
Files::Folder.list_for("remote/path/to/folder/").each do |file|
|
555
|
-
puts file.path
|
556
|
-
end
|
557
|
-
```
|
558
|
-
|
559
|
-
### Copy
|
560
|
-
|
561
|
-
The copy method works for both files and folders.
|
562
|
-
|
563
|
-
```ruby
|
564
|
-
file = Files::File.new("source/path")
|
565
|
-
file.copy(destination: "destination/path")
|
566
|
-
```
|
567
|
-
|
568
|
-
### Move
|
569
|
-
|
570
|
-
The move method works for both files and folders.
|
571
|
-
|
572
|
-
```ruby
|
573
|
-
file = Files::File.new("source/path")
|
574
|
-
file.move(destination: "destination/path")
|
575
|
-
```
|
576
|
-
|
577
|
-
### Delete
|
578
|
-
|
579
|
-
The delete method works for both files and folders.
|
580
|
-
|
581
|
-
```ruby
|
582
|
-
Files::File.delete("path/to/file/or/folder")
|
583
|
-
```
|
584
|
-
|
585
|
-
In case the folder is not empty, you can use the `recursive` argument:
|
586
|
-
|
587
|
-
```ruby
|
588
|
-
Files::File.delete("path/to/folder", recursive: true)
|
589
|
-
```
|
590
|
-
|
591
512
|
## Mock Server
|
592
513
|
|
593
514
|
Files.com publishes a Files.com API server, which is useful for testing your use of the Files.com
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.190
|
data/lib/files.com/version.rb
CHANGED