Skip to content

Commit

Permalink
Add new lines (#115)
Browse files Browse the repository at this point in the history
* Add new lines

* Remove newlines
  • Loading branch information
0xLeif authored Oct 10, 2024
1 parent 57ea077 commit 2d5f1e3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// A protocol that provides methods for reading, writing, and deleting files in a type-safe, sendable manner.
public protocol FileManaging: Sendable {

/// Reads a file from the given path and decodes its contents into the specified type.
/// - Parameters:
/// - path: The directory path where the file is located. Defaults to the current directory `"."`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Foundation
/// A protocol that provides a thread-safe interface for interacting with `NSUbiquitousKeyValueStore`,
/// which synchronizes key-value data across the user's iCloud-enabled devices.
public protocol UbiquitousKeyValueStoreManaging: Sendable {

/// Retrieves data stored in iCloud for the specified key.
/// - Parameter key: The key used to retrieve the associated data from the `NSUbiquitousKeyValueStore`.
/// - Returns: The `Data` object associated with the key, or `nil` if no data is found.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/// A protocol that provides a thread-safe interface for interacting with `UserDefaults`,
/// allowing the storage, retrieval, and removal of user preferences and data.
public protocol UserDefaultsManaging: Sendable {

/// Retrieves an object from `UserDefaults` for the given key.
/// - Parameter key: The key used to retrieve the associated value from `UserDefaults`.
/// - Returns: The value stored in `UserDefaults` for the given key, or `nil` if no value is associated with the key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ extension Application {
public func data(forKey key: String) -> Data? {
NSUbiquitousKeyValueStore.default.data(forKey: key)
}

public func set(_ value: Data?, forKey key: String) {
NSUbiquitousKeyValueStore.default.set(value, forKey: key)
}

public func removeObject(forKey key: String) {
NSUbiquitousKeyValueStore.default.removeObject(forKey: key)
}
Expand Down

0 comments on commit 2d5f1e3

Please sign in to comment.