@@ -52,9 +52,9 @@ public extension NextcloudKit {
5252 }
5353 }
5454
55- func createFolder ( serverUrlFileName: String ,
56- account: String ,
57- options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , ocId: String ? , date: Date ? , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
55+ func createFolderAsync ( serverUrlFileName: String ,
56+ account: String ,
57+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , ocId: String ? , date: Date ? , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
5858 await withUnsafeContinuation ( { continuation in
5959 NextcloudKit . shared. createFolder ( serverUrlFileName: serverUrlFileName, account: account, options: options) { account, ocId, date, responseData, error in
6060 continuation. resume ( returning: ( account: account, ocId: ocId, date: date, responseData: responseData, error: error) )
@@ -97,9 +97,9 @@ public extension NextcloudKit {
9797 }
9898 }
9999
100- func deleteFileOrFolder ( serverUrlFileName: String ,
101- account: String ,
102- options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
100+ func deleteFileOrFolderAsync ( serverUrlFileName: String ,
101+ account: String ,
102+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
103103 await withUnsafeContinuation ( { continuation in
104104 NextcloudKit . shared. deleteFileOrFolder ( serverUrlFileName: serverUrlFileName, account: account, options: options) { account, responseData, error in
105105 continuation. resume ( returning: ( account: account, responseData: responseData, error: error) )
@@ -151,11 +151,11 @@ public extension NextcloudKit {
151151 }
152152 }
153153
154- func moveFileOrFolder ( serverUrlFileNameSource: String ,
155- serverUrlFileNameDestination: String ,
156- overwrite: Bool ,
157- account: String ,
158- options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
154+ func moveFileOrFolderAsync ( serverUrlFileNameSource: String ,
155+ serverUrlFileNameDestination: String ,
156+ overwrite: Bool ,
157+ account: String ,
158+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
159159 await withUnsafeContinuation ( { continuation in
160160 NextcloudKit . shared. moveFileOrFolder ( serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: overwrite, account: account, options: options) { account, responseData, error in
161161 continuation. resume ( returning: ( account: account, responseData: responseData, error: error) )
@@ -208,11 +208,11 @@ public extension NextcloudKit {
208208 }
209209 }
210210
211- func copyFileOrFolder ( serverUrlFileNameSource: String ,
212- serverUrlFileNameDestination: String ,
213- overwrite: Bool ,
214- account: String ,
215- options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
211+ func copyFileOrFolderAsync ( serverUrlFileNameSource: String ,
212+ serverUrlFileNameDestination: String ,
213+ overwrite: Bool ,
214+ account: String ,
215+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , responseData: AFDataResponse < Data ? > ? , error: NKError ) {
216216 await withUnsafeContinuation ( { continuation in
217217 NextcloudKit . shared. copyFileOrFolder ( serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: overwrite, account: account, options: options) { account, responseData, error in
218218 continuation. resume ( returning: ( account: account, responseData: responseData, error: error) )
@@ -282,12 +282,12 @@ public extension NextcloudKit {
282282 }
283283 }
284284
285- func readFileOrFolder ( serverUrlFileName: String ,
286- depth: String ,
287- showHiddenFiles: Bool = true ,
288- requestBody: Data ? = nil ,
289- account: String ,
290- options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , files: [ NKFile ] ? , responseData: AFDataResponse < Data > ? , error: NKError ) {
285+ func readFileOrFolderAsync ( serverUrlFileName: String ,
286+ depth: String ,
287+ showHiddenFiles: Bool = true ,
288+ requestBody: Data ? = nil ,
289+ account: String ,
290+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , files: [ NKFile ] ? , responseData: AFDataResponse < Data > ? , error: NKError ) {
291291 await withUnsafeContinuation ( { continuation in
292292 NextcloudKit . shared. readFileOrFolder ( serverUrlFileName: serverUrlFileName, depth: depth, showHiddenFiles: showHiddenFiles, requestBody: requestBody, account: account, options: options) { account, files, responseData, error in
293293 continuation. resume ( returning: ( account: account, files: files, responseData: responseData, error: error) )
@@ -502,10 +502,10 @@ public extension NextcloudKit {
502502 }
503503 }
504504
505- func setFavorite ( fileName: String ,
506- favorite: Bool ,
507- account: String ,
508- options: NKRequestOptions = NKRequestOptions ( ) ) async -> NKError {
505+ func setFavoriteAsync ( fileName: String ,
506+ favorite: Bool ,
507+ account: String ,
508+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> NKError {
509509 await withUnsafeContinuation ( { continuation in
510510 NextcloudKit . shared. setFavorite ( fileName: fileName, favorite: favorite, account: account) { _, _, error in
511511 continuation. resume ( returning: error)
@@ -564,6 +564,17 @@ public extension NextcloudKit {
564564 }
565565 }
566566
567+ func listingFavoritesAsync( showHiddenFiles: Bool ,
568+ includeHiddenFiles: [ String ] = [ ] ,
569+ account: String ,
570+ options: NKRequestOptions = NKRequestOptions ( ) ) async -> ( account: String , files: [ NKFile ] ? , responseData: AFDataResponse < Data > ? , error: NKError ) {
571+ await withUnsafeContinuation ( { continuation in
572+ NextcloudKit . shared. listingFavorites ( showHiddenFiles: showHiddenFiles, includeHiddenFiles: includeHiddenFiles, account: account, options: options) { account, files, data, error in
573+ continuation. resume ( returning: ( account, files, data, error) )
574+ }
575+ } )
576+ }
577+
567578 func listingTrash( filename: String ? = nil ,
568579 showHiddenFiles: Bool ,
569580 account: String ,
0 commit comments