Skip to content

Comments

Performance: Improved IO operations (#43)#45

Open
vishalrao8 wants to merge 2 commits intodeansyd:masterfrom
vishalrao8:perf/improved_io
Open

Performance: Improved IO operations (#43)#45
vishalrao8 wants to merge 2 commits intodeansyd:masterfrom
vishalrao8:perf/improved_io

Conversation

@vishalrao8
Copy link

Feature Title

Improve IO performance of icloud operations. closes #43

Type of Change

  • New feature (non-breaking change which adds functionality)

Description of the Feature

  • Provide root directory URI of local iCloud container, files can be manipulated directly and then synced implicitly by OS.
  • Return Boolean based acknowledgment for successful download method.

Implementation Details

  • A new method channel named getContainerDirectory has been introduced to provide root directory of local iCloud container.
  • Existing method channel for download has been modified to return acknowledgment along with existing onProgress callback. localFilePath argument has been removed which was used earlier to download and move files to user provided directory (Redundant step).

Impact of the Feature

  • Removes the need of repeated deletion and creation of new file for upload operation (existing upload method is inefficient) by providing direct access to directory of iCloud container via new method channel enabling client to directly create or manage files. Changes in root directory of local iCloud container reflects remote iCloud space.
  • Makes the existing upload method redundant.
  • Returns future based Boolean acknowledgement on successful download operation of iCloud files which can be used to chain multiple download operations using async/await.

Testing Conducted

This PR change has been thoroughly tested and is being used in production as local package dependency.

Checklist

  • My code adheres to the project's coding and style guidelines.
  • I have conducted a self-review of my code.
  • I have commented on my code, particularly in complex areas.
  • I have made corresponding changes to the documentation.
  • I have tested my features thoroughly in different environments.
  • I have added tests that prove my feature works as intended.
  • New and existing unit tests pass locally with my changes.
  • I have assessed the performance impact of the feature.
  • My changes do not introduce new warnings or errors.
  • I have checked for compatibility with other parts of the codebase.

@vishalrao8 vishalrao8 changed the title perf(io_improvement): Improved IO operations Performance: Improved IO operations (#43) Jul 25, 2024
kingdomseed added a commit to kingdomseed/icloud_storage_plus that referenced this pull request Mar 17, 2025
Implement I/O improvements from PR deansyd#45 (original repository):

Add getContainerPath method to access the root iCloud container directory
Modify download method to return a boolean success value
Remove destinationFilePath parameter from download method
Update documentation to reflect new API usage patterns
Add examples for using the new container path access feature
Update tests to match the new API signatures
These improvements enhance file operations by providing direct access to the
iCloud container and simplifying the download process, following Apple's
guidelines for iCloud integration.

Updated macOS platform channel implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance Improvements

1 participant