[wp-trac] [WordPress Trac] #53659: Optional skipping of hidden files/folders in list_files

WordPress Trac noreply at wordpress.org
Fri Jun 2 16:48:08 UTC 2023


#53659: Optional skipping of hidden files/folders in list_files
-------------------------------------------------+-------------------------
 Reporter:  yani.iliev                           |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.3
Component:  Filesystem API                       |     Version:  4.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing has-testing-info                       |
-------------------------------------------------+-------------------------
Changes (by costdev):

 * keywords:  has-patch has-unit-tests needs-testing-info needs-testing =>
     has-patch has-unit-tests needs-testing has-testing-info


Comment:

 == Testing Instructions

 === Steps to Test
 1. Create a directory with several files and subdirectories.
   - Make sure each directory and subdirectory has a file called `.hidden-
 file` and a file called `.hidden-file-2`.
   - The `.` denotes a hidden file.
 x. Call `list_files( $path_to_folder )`.
 x. Call `list_files( $path_to_folder, 100, array(), true )`.
 x. Call `list_files( $path_to_folder, 100, array( '.hidden-file-2' ), true
 )`.

 === Expected Results

 Before the patch:
 2. The result should not contain the hidden files.
 3. The result should not contain the hidden files.
 4. The result should not contain the hidden files.

 After the patch:
 2. The result should not contain the hidden files.
 3. The result should contain all of the hidden files.
 4. The result should only contain `.hidden-file` entries, and should not
 include `.hidden-file-2` entries.

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


More information about the wp-trac mailing list