DescriptionPrototype of Files service.
Defines two important interfaces, Directory and File. Provides a basic,
single-threaded implementation of the latter (with a few omissions), an
extremely incomplete implementation of the former (more complete
implementation to follow soon, with tests), and a root Files
interface/application.
Limitations:
* Directory isn't really implemented.
* Makes no security guarantees -- i.e., definitely insecure (doesn't
prevent path traversal "out of" a "file system").
* Not implemented: file streaming (read/write), file mapping, file
re-opening.
* Various other flags not implemented (e.g., recursive delete).
* Theoretical implementation: many things as yet totally untested.
* Single-threaded. Should be easy enough to move to a thread pool (but
note that operations still need to be sequenced within each
"object"/message pipe).
* Still not specified (but definitely desired): directory streaming.
* Still need more error codes.
* Still needs more comments and documentation.
Changes over previous iterations:
* Temporarily removed most of (totally untested) Directory
implementation.
* "file manager" -> "files".
* Introduced a Timespec struct (and nanosecond resolution).
* Turned persistent, shared "user" directory into a "debug" directory.
* Various other requested features added/changes made.
Open questions:
* There's some duplication between Directory and File (e.g., they both
have Stat()). Perhaps it'd be more POSIX-y to combine them?
* Semantics for "chroot"-type operations and "re-open" operations.
* (Lots of thinking with respect to security in general.)
R=qsr@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/2a394496d9f098564e3a52cc62c937801dd1b1f0
Patch Set 1 #Patch Set 2 : oops #Patch Set 3 : wipwipwip #
Total comments: 19
Patch Set 4 : Directory: remove Change(); add Stat() and Touch(); fix Read() #Patch Set 5 : Directory: make OpenFile()'s |file| arg optional; add flags to OpenDirectory(); add Delete() #
Total comments: 15
Patch Set 6 : ReadStream -> ReadToStream, WriteStream -> WriteFromStream #Patch Set 7 : Implement File::Stat() #Patch Set 8 : Timespec #Patch Set 9 : num_bytes_to_read for ReadToStream #Patch Set 10 : Implement File::Touch() #Patch Set 11 : stat and touch for dirs #Patch Set 12 : asdf #Patch Set 13 : jkl #Patch Set 14 : OpenDirectory, theoretically #Patch Set 15 : DirectoryImpl::Read, theoretically #Patch Set 16 : DirectoryImpl::Delete, theoretically #Patch Set 17 : format #Patch Set 18 : include sys.stat.h for UTIME_OMIT, etc. #Patch Set 19 : Home -> Debug #Patch Set 20 : FileManager -> Files, etc. #Patch Set 21 : android fix #1 #Patch Set 22 : android fix #2 #Patch Set 23 : oops #Patch Set 24 : doh #Patch Set 25 : I am an idiot #Patch Set 26 : a3 #Patch Set 27 : moar tests #Patch Set 28 : Remove much of DirectoryImpl implementation until I write tests. #
Total comments: 28
Patch Set 29 : asdf #Patch Set 30 : moar comments #
Total comments: 24
Patch Set 31 : review comments #Patch Set 32 : already ignored EINTR #Messages
Total messages: 27 (8 generated)
|