2670*2671* @param array|null$files The list of files to usefor filename comparisons.2672*Defaultnull(to retrieve the list from the filesystem).2673* @param string$dir The directory for the newfile.2674* @param string$filename The proposed filename for the newfile.2675*/2676$files=apply_filters('pre_wp_unique_filename_file_list',null,$dir,$filename);26772678if(null===$files){2679// List of all files and directories contained in $dir.2680$files= @scandir($dir);2681}2682
History
Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.