This issue is based on the following request on Drupal core improvements » File system:
“file_scan_directory() should return objects that have the same properties as the $file object returned by file_load(). Right now the file path is $file->path instead of $file->filepath, base name is $file->basename instead of $file->filename. The main complication of this patch is that there are quite a few core functions that directly return the results of this function so the change cascades out.”
I've made a patch that changes this, however, it doesn't go all the way and enforce this terminology throughout Drupal. E.g. it does not rename {registry}.filename to {registry}.filepath even though the fields contains a path a not just a path-less filename. Do we want to do that? And do we want to do it in one big issue, or is this better handled in separate issues?
Comment | File | Size | Author |
---|---|---|---|
file_scan_directory-1.patch | 49.95 KB | c960657 | |
Comments
Comment #1
c960657 CreditAttribution: c960657 commentedComment #2
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #3
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #4
drewish CreditAttribution: drewish commentedUh wow, record commit time... we do need to document this in the upgrade instructions.
Comment #5
c960657 CreditAttribution: c960657 commentedI suggest the following for http://drupal.org/node/224333. I don't have permission to edit that page.
Comment #6
c960657 CreditAttribution: c960657 commentedApparently I now have access to edit the page, so I did:
http://drupal.org/node/224333#file_scan_directory_property_names