You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+48-1Lines changed: 48 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,22 @@ void setup(){
14
14
storageMedium.begin();
15
15
}
16
16
```
17
-
You can initialize a Arduino_UnifiedStorage object of each type (QSPI, SD, USB), and copy files and folders from one medium to another.
17
+
18
+
There is also an overloaded version of the `begin()` method that takes in an argument of type `FileSystems` (can be `FS_FAT` or `FS_LITTLEFS`)
19
+
```
20
+
void setup(){
21
+
storageMedium.begin(FS_FAT);
22
+
}
23
+
```
24
+
### Format QSPI Flash, SD cards, and USB mass storage devices
25
+
This library also allows you to format any partition or drive to either FAT or LittleFS filesystems.
26
+
27
+
```storageMedium.formatFAT()```
28
+
or
29
+
```storageMedium.formatLittleFS();```
30
+
31
+
Please make sure you call format before calling `begin()` or after calling `unmount()`.
32
+
18
33
19
34
### Open, Write, and Read Files
20
35
@@ -103,6 +118,9 @@ In this example, the `available()` method is called to retrieve the number of av
103
118
104
119
These methods are useful for scenarios where you need to navigate to a specific position in a file or check the availability of data before performing read operations.
105
120
121
+
### Close files
122
+
Closing files is extremely important as filesystems might fail to unmount if files are kept open. You can close files by calling `file.close()`
123
+
106
124
### File Manipulation
107
125
The library provides various file manipulation operations such as renaming, deleting, moving, and copying files.
This method also allows you to set the behaviour if there's an existing file with the same name at the location you want to move to. You can set the optional parameter `overwrite` to `true`.
This method also allows you to set the behaviour if there's an existing file with the same name at the location you want to move to. You can set the optional parameter `overwrite` to `true`.
This method also allows you to set the behaviour if there's an existing Folder with the same name at the location you want to move to. You can set the optional parameter `overwrite` to `true`.
This method also allows you to set the behaviour if there's an existing Folder with the same name at the location you want to move to. You can set the optional parameter `overwrite` to `true`.
0 commit comments