[wp-trac] [WordPress Trac] #29544: WP_Filesystem_MockFS permissions support
WordPress Trac
noreply at wordpress.org
Fri Nov 6 13:22:34 UTC 2015
#29544: WP_Filesystem_MockFS permissions support
------------------------------+-----------------------------
Reporter: mnelson4 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version: 3.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+-----------------------------
Comment (by jdgrimes):
Thanks for alerting me to this ticket @mnelson4. I'm not sure that I even
knew that `WP_Filesystem_MockFS` existed when I created my version of
this.
The reason that I didn't attempt to use vfsStream was that I actually
didn't care about ownership/permission stuff, and handling users and
groups in vfsStream seemed complicated. I think vfsStream also had some
limitations in regard to the number of users and groups as well.
So, currently https://github.com/JDGrimes/wp-filesystem-mock doesn't
bother with ownership at all, but support could probably be added easily.
I don't know what all of the pros and cons are of using this approach as
opposed to VFS, but obviously my approach will only work when
`$wp_filesystem` is used—any direct use of functions like `file_exists()`
that would normally work when using VFS wouldn't work (since there is no
virtual filesystem, the "filesystem" is just a bunch of nodes in an
array). (vfsStream actually also has the
[https://github.com/mikey179/vfsStream/wiki/Known-Issues same issue with
some functions].)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29544#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list