Skip to content

Commit 4135d43

Browse files
committed
📖 Updated with new names for Swift
1 parent 0bcd29a commit 4135d43

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,16 @@ NSString* fileName = [directoryWrapper addContent: @"Hello, World!" withFilename
120120
let directoryWrapper: LSFileWrapper
121121
122122
// Adds an empty directory with preferred name
123-
let folderName = directoryWrapper.addFileWrapper(LSFileWrapper(directory: ()) withFilename: "Empty Directory Name")
123+
let folderName = directoryWrapper.add(wrapper: LSFileWrapper(directory: ()) withFilename: "Empty Directory Name")
124124
125125
// Adds and overrides any wrappers matching the filename
126-
directoryWrapper.setFileWrapper(LSFileWrapper(directory: ()) withFilename: "Empty Directory Name")
126+
directoryWrapper.set(wrapper: LSFileWrapper(directory: ()) withFilename: "Empty Directory Name")
127127
128128
// Adds a new text file. Content has to be of Objective-C type, i.e. NSString, NSData... or casted with `as` operator
129-
let filename = directoryWrapper.addContent(NSString("Hello, World!"), withFilename: "hello.txt")
129+
let filename = directoryWrapper.add(content: NSString("Hello, World!"), withFilename: "hello.txt")
130130
131131
// Adds and overrides any files matching the filename. This method can be used when changes are made to the file
132-
directoryWrapper.setContent("Hello, World!" as NSString, withFilename: "hello.txt")
132+
directoryWrapper.set(content: "Hello, World!" as NSString, withFilename: "hello.txt")
133133
```
134134
### Reading Contents
135135
> **_Notice:_** File wrappers only.
@@ -163,7 +163,7 @@ LSFileWrapper* fileWrapper;
163163
```swift
164164
let fileWrapper: LSFileWrapper
165165
166-
fileWrapper.updateContent("Hello, World!" as NSString)
166+
fileWrapper.update(newContent: "Hello, World!" as NSString)
167167
```
168168
### Removing wrappers
169169
> **_Notice:_** Directory wrappers only.

0 commit comments

Comments
 (0)