-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Features + GitHub Actions Workflows + Dependency Manager Contract Files #1
Merged
OS-ricardomoreirasilva
merged 31 commits into
development
from
feat/directory-file-features
Feb 5, 2025
Merged
Add Features + GitHub Actions Workflows + Dependency Manager Contract Files #1
OS-ricardomoreirasilva
merged 31 commits into
development
from
feat/directory-file-features
Feb 5, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since it's the first feature to be implemented, it includes adding the new files.
Includes a few refactors on create directory to keep structure as similar as possible.
Create a URLFactory that, depending on the current build iOS version, uses the new or current (to be deprecated) version of creating an URL based on a path string.
Refactor existing implementation to use the new method.
Refactor project to make it easier to navigate. Add new swiftlint disabled rule.
Exchange URLFactory with an extension as there are now 2 methods being used and it makes sense to group it all.
Split OSFLSTFileManagerTests file into different extensions to avoid SwiftLint warnings.
For Xcode 15, 'switch' statements may only be used as expression in return, throw, or as the source of an assignment.
This makes the whole library simpler to use. Adapt tests accordingly. Remove redundant code. Add two missing tests, one for rename and another for copy, where the FileManager fails its operations.
These new values accommodate values required by the Cordova plugin. By having this, the name "SearchPath" doesn't make sense anymore, which justifies its update to DirectoryType. Add tests for these new types.
Apply some additional refactoring.
rename the old readFile method to readEntireFile for easier separation of concerns.
Byte buffers, since they're Base64 data, need to be encoding in multiple of 3 sizes.
This is added to the OSFILEChunkSubscription flow. Add unit test to validate scenario.
Adopt the ION name instead of OS. Update Gemfile bundles.
5742333
to
8422aed
Compare
1925027
to
a7f98f5
Compare
Removed a readFileInChunks test as it proved unreliable for versions below iOS 18.
a7f98f5
to
6048412
Compare
Not super important right now, but maybe we can already change the repository name to match the convention we defined? So it would be |
Done ☑️ |
This aligns the read methods with the approach already used for write.
OS-pedrogustavobilro
added a commit
to ionic-team/ion-android-filesystem
that referenced
this pull request
Jan 31, 2025
To be consistent with iOS: ionic-team/ion-ios-filesystem#1
Remove the return statement from saveFile. Align getItemAttributes with the rest of the protocol's methods: to receive a URL instead of a plain-text path. Add the withSecurityScopedAccess verification to all operations. Add read file validations to validate the behaviour when the file doesn't exists. Refactor the code a bit, to remove unnecessary protocol logic.
This introduced a change in the logic so it reverts it.
OS-pedrogustavobilro
approved these changes
Feb 3, 2025
OS-martacarlos
approved these changes
Feb 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the following features:
readEntireFile(atURL:withEncoding:)
;readFileInChunks(atURL:withEncoding:andChunkSize:)
;listDirectory(atURL:)
:getItemAttributes(atPath:)
;getFileURL(atPath: withSearchPath:)
;saveFile(atURL:withEncodingAndData:includeIntermediateDirectories:)
;appendData(_:atURL:includeIntermediateDirectories:)
;createDirectory(atURL:includeIntermediateDirectories:)
;removeDirectory(atURL:includeIntermediateDirectories:)
;deleteFile(atURL:)
;renameItem(fromURL:toURL:)
;copyItem(fromURL:toURL:)
.Add GitHub Actions workflows
Add Podspec file
Add Swift Package Manage file.