[2.7][Filesystem] Changed dumpFile to allow dumping to streams... - #14754
[2.7][Filesystem] Changed dumpFile to allow dumping to streams...#14754markchalloner wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
hierarchy ? this is the first time I see this word used for a path component
There was a problem hiding this comment.
Includes the authority as well as the path.
STD 66 and RFC 3986 call it "hierarchical part" but hierarchy seemed nicer.
http://en.wikipedia.org/wiki/URI_scheme
Cheers
There was a problem hiding this comment.
rather than implementing these in 2 separate methods, each of them redoing the same splitting of the path, what about doing the logic determining both in the same place (either here or in a method returning array($scheme, $hierarchy) and using list($scheme, $hierarchy) = ... here) ?
|
In the current |
There was a problem hiding this comment.
why don't you use file_exists (or is_readable)?
|
I think I fixed a TOCTOU security vulnerability but can someone check: I also added a MockStream as none of the built-in ones were suitable for testing (see comments in testTempnamWith*SchemeFails). |
…tive tempnam() and fixed dumpFile to allow dumping to streams
|
Rebased onto 2.8 in #14970 |
...as rename can only work where $oldname and $newname have the same streams wrappers.
Added tempnam, stream wrapper aware version of tempnam(), to do the heavy lifting.