-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make MemoryRandomAccessFile handle the file being moved from under it…
… (dart-lang/file#157) * Make rename tests verify the path of the returned FileSystemEntity * Add explicit types to fix analysis lints * Make MemoryRandomAccessFile handle the file being moved from under it Fix `MemoryRandomAccessFile` to use only its `FileNode` and never the corresponding `MemoryFile`. While the `MemoryRandomAccessFile` (the equivalent of a file handle) is open, its `FileNode` should never change, but the original `MemoryFile` might become backed by a different node if the file is moved, removed, or replaced. POSIX systems typically allow this; Windows typically doesn't. For now, make `MemoryFileSystem` follow the typical POSIX behavior. (In the long-term, `MemoryFileSystem` perhaps should have configurable behavior.) * Make MemoryFile.openWrite better handle a file being moved from under it Make `MemoryFile.openWrite`'s `IOSink` resolve the `FileNode` immediately instead of adding it to an async queue. Otherwise node resolution could return a different `FileNode` than what was originally intended. Eagerly resolving the `FileNode` has the side-effect of potentially throwing exceptions earlier than expected. I therefore added a mechanism to defer throwing.
- Loading branch information
1 parent
7511c80
commit c9dd585
Showing
8 changed files
with
161 additions
and
25 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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