WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 6 weeks ago

#53659 new enhancement

Optional skipping of hidden files/folders in list_files

Reported by: yani.iliev Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Filesystem API Keywords:
Focuses: Cc:

Description

The function always skips hidden files/folders that begin with a dot (.)
This allows for files like .htaccess and .git to be skipped when listing a folder.
This ticket is about allow to suppress this behavior in the function and return hidden files/folders that begin with a dot (.).
One possible solution is to add a new argument to the function so that the function is defined as such:
function list_files( $folder = '', $levels = 100, $exclusions = array(), $skip_dots = true )

Change History (2)

#1 @yani.iliev
5 months ago

  • Type changed from defect (bug) to enhancement

#2 @sabernhardt
6 weeks ago

  • Component changed from General to Filesystem API
Note: See TracTickets for help on using tickets.