Skip to content

Comments

Extended support for files_lock server app#190

Merged
camilasan merged 2 commits intomainfrom
feature/support-lock-type
Sep 28, 2025
Merged

Extended support for files_lock server app#190
camilasan merged 2 commits intomainfrom
feature/support-lock-type

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Sep 25, 2025

  • Restructured file lock information into a dedicated complex type.
  • Extended existing locking methods to support the lock type argument.
  • Updated the asynchronous lock method to resemble conventional patters of modern concurrency and error handling.

Required for: nextcloud/nextcloudfileproviderkit#124
files_lock documentation: https://github.com/nextcloud/files_lock?tab=readme-ov-file#api

@i2h3 i2h3 self-assigned this Sep 25, 2025
@i2h3 i2h3 added the enhancement New feature request label Sep 25, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends support for the files_lock server app by restructuring file lock information and adding support for lock types. The changes modernize the API with better async/await patterns and structured data models.

  • Restructured file lock information from scattered properties into a dedicated NKLock complex type
  • Extended locking methods to support lock type arguments through new NKLockType enum
  • Updated asynchronous lock method to use modern throwing continuation patterns instead of tuple returns

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
NextcloudKit+FilesLock.swift Updated lock/unlock methods to support lock types and improved async implementation
NextcloudKit+Capabilities.swift Added support for detecting lock type capabilities from server
NKLockType.swift New enum defining the three types of locks supported by files_lock app
Models/NKLock.swift New structured model representing file lock information
Models/NKFile.swift Simplified lock representation by replacing multiple properties with single NKLock object
Models/NKDataFileXML.swift Updated XML parsing to use new NKLock model instead of individual properties

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Restructured file lock information into a dedicated complex type.
- Extended existing locking methods to support the lock type argument.
- Updated the asynchronous lock method to resemble conventional patters of modern concurrency and error handling.

Signed-off-by: Iva Horn <iva.horn@icloud.com>
Signed-off-by: Iva Horn <iva.horn@icloud.com>
@i2h3 i2h3 force-pushed the feature/support-lock-type branch from a038adf to 525bafe Compare September 27, 2025 07:45
@camilasan camilasan merged commit 96c2b0e into main Sep 28, 2025
4 checks passed
@i2h3 i2h3 deleted the feature/support-lock-type branch September 29, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants