You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal
Properties have yet to be implemented, but when they are, the following principles should be adopted.
They are cached when possible;
Implement Refresh and RefreshAsync to populate the core properties in a single method (same as FileInfo)
For properties that are not cached and require disk IO (Exists, Attributes, Dates, etc.) they should call Refresh or RefreshAsync to allow multiple properties to be updated in a single call
Options
SystemFile is a "live" view of the file. In this scenario, any call to a property will get the latest update from disk (Attributes, Exists, etc.); this will require those properties to be Async.
Options
Two properties of each type where disk IO is required, for example "Exists" and "ExistsAsync", one uses cached results, one is direct to disk. this gives the developer the option to choose.
The text was updated successfully, but these errors were encountered:
This storage abstraction aims to create a single API surface that every file system can implement.
To make that easy and efficient for everyone (implementors, consumers, maintainers), we:
Implement the standardized interfaces
Expose a way to manipulate the file directly, via the underlying implementation.
If the consumer is able to instantiate or type check for a certain storage implementation, they must also have access to the underlying library that the implementation uses.
For example:
In OwlCore.Storage.Uwp, we expose the underlying IStorageFile and IStorageFolder, which can be used directly.
In OwlCore.Storage.OneDrive, we expose the underlying DriveItem, which can be provided to APIs in the Microsoft.Graph package.
and so on. Because of that (and as explained in other participating issues), we won't be adding these to SystemFile directly.
However, these are great notes for #23. Our current API surface implies that properties are kept always update-to date. Since they are retrieved by an async method, implementations can use that set up property updates if it's supported. If it's not supported, the event just never fires.
This setup handles a lot of important things implicitly, but it does not handle opting out of these events. @HEIC-to-JPEG-Dev Mentioning the RefreshAsync method gave me an idea, let's move this to #23.
Issue
There are currently no File properties
Proposal
Properties have yet to be implemented, but when they are, the following principles should be adopted.
Options
SystemFile is a "live" view of the file. In this scenario, any call to a property will get the latest update from disk (Attributes, Exists, etc.); this will require those properties to be Async.
Options
Two properties of each type where disk IO is required, for example "Exists" and "ExistsAsync", one uses cached results, one is direct to disk. this gives the developer the option to choose.
The text was updated successfully, but these errors were encountered: