Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
file system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2006 at 15:08 UTC
Updated:
25 Dec 2006 at 21:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
ChrisKennedy commentedWhat about modifying file_scan_directory so that it doesn't traverse any directories beginning with a period?
Comment #2
dries commentedIf we add .svn, we might as well want to add .darcs. :)
Comment #3
ChrisKennedy commentedAttached patch adds $omit_hidden as the final parameter to file_scan_directory(), defaulting to TRUE, in which case it ignores all files/directories beginning with a period. Modules that want to store data in hidden directories/files can set the flag to FALSE.
This would also fix hidden files with ._ prefix show on module list.
Comment #4
allie mickaGreat big +1 on hiding .* files.
Is there a compelling reason to add the $omit_hidden flag? I can't think of a viable use case for wanting to see files that are supposed to be hidden?
Comment #5
ChrisKennedy commentedIt seems possible that a module would want to keep security-related information in a hidden file, or to keep temporary files in a hidden directory. But removing the flag is also fine with me if that level of customization isn't needed.
Comment #6
dman commentedI already tweaked it to do so (skip .directories) for my filebrowser extensions work.
Did so by changing the default exclusion pattern. You can overr-ride it by explicitly giving a blank exclusion pattern
Comment #7
dries commented-1 on the extra parameter. Why can probably always hide these.
Comment #8
ChrisKennedy commentedSounds good - I only added the parameter because I thought it would get more complaints otherwise. Here is the revised patch.
Comment #9
ChrisKennedy commentedI just realized that the $omit_hidden patch neglected to pass omit_hidden to recursive calls, so we averted a problem anyway.
Comment #10
dries commentedExtended the documentation a little and committed the patch to CVS HEAD.
Comment #11
killes@www.drop.org commentedbackported
Comment #12
(not verified) commented