Skip to content

Commit 35b449e

Browse files
authored
📖 Updated Swift names
1 parent c2d9639 commit 35b449e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ let optionalString = fileWrapper.string()
152152
### Updating Contents
153153
> **_Notice:_** File wrappers only.
154154
155-
To update the contents of a regular file wrapper use `-updateContent`.
155+
To update the contents of a regular file wrapper use `-updateContent`, named `update(newContent:)` in Swift.
156156
```objective-c
157157
LSFileWrapper* fileWrapper;
158158

@@ -168,7 +168,7 @@ fileWrapper.update(newContent: "Hello, World!" as NSString)
168168
### Removing wrappers
169169
> **_Notice:_** Directory wrappers only.
170170
171-
To remove a file wrapper from existing wrapper use `-removeFileWrapper`.
171+
To remove a file wrapper from existing wrapper use `-removeFileWrapper` or `removeFileWrapperWithPath`, named `removeWrapper()` or `removeWrapper(with:)` in Swift.
172172
```objective-c
173173
LSFileWrapper* directoryWrapper;
174174

@@ -187,17 +187,17 @@ if (wrapperToRemove) {
187187
let directoryWrapper: LSFileWrapper
188188
189189
// Using a path, can also contain "/" for subfolder search, all children can be removed
190-
directoryWrapper.removeFileWrapper(with: "hello.txt")
190+
directoryWrapper.removeWrapper(with: "hello.txt")
191191
192192
// Using an instance of a wrapper. Path can also contain "/" for subfolder search, however only 'first' children can be removed.
193-
if let wrapperToRemove = directoryWrapper.withPath("hello.txt") {
194-
directoryWrapper.removeFileWrapper(wrapperToRemove)
193+
if let wrapperToRemove = directoryWrapper.wrapper(with: "hello.txt") {
194+
directoryWrapper.removeWrapper(wrapperToRemove)
195195
}
196196
```
197197
### Getting child wrappers
198198
> **_Notice:_** Directory wrappers only.
199199
200-
To get a wrapper from a directory wrapper call `-fileWrapperWithPath`, this will also traverse all children based on supplied path.
200+
To get a wrapper from a directory wrapper call `-fileWrapperWithPath`, named `wrappers(with:)` in Swift, this will also traverse all children based on supplied path.
201201
```objective-c
202202
LSFileWrapper* directoryWrapper;
203203

@@ -211,7 +211,7 @@ let directoryWrapper: LSFileWrapper
211211
let wrapper = directoryWrapper.wrapper(with: "hello.txt")
212212
```
213213

214-
To get all first-degree child wrappers from a directory wrapper call `-fileWrappersInPath`, this will also traverse all children based on supplied path.
214+
To get all first-degree child wrappers from a directory wrapper call `-fileWrappersInPath`, named `wrappers(in:)` in Swift, this will also traverse all children based on supplied path.
215215
```objective-c
216216
LSFileWrapper* directoryWrapper;
217217

0 commit comments

Comments
 (0)