[wp-trac] [WordPress Trac] #57375: Add move_dir() function

WordPress Trac noreply at wordpress.org
Mon Jan 23 23:55:31 UTC 2023


#57375: Add move_dir() function
----------------------------+--------------------------
 Reporter:  afragen         |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  6.2
Component:  Filesystem API  |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  performance
----------------------------+--------------------------

Comment (by peterwilsoncc):

 @afragen @azaozz I've created a
 [https://core.trac.wordpress.org/ticket/57375 pull request with an
 alternative approach] but messed up linking it to this ticket.

 Instead of detecting the filesystem in the global `move_dir()` function,
 it calls the new method `$filesystem->move_dir()` and deals with the
 required steps in each class. I think this is a little neater.

 It doesn't take in to account any of the feedback in the review above,
 pushed through by the GH bot, as it was written in parallel to that
 comment. Excellent timing.

 The 200ms delay does seem a little ugly to me but in my testing yesterday,
 even with that delay running updates was significantly faster.

 The PR is in draft as it needs unit tests, treat it as a POC for now.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57375#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list