pathinfo() function at file.e
- Posted by Marco Achury <achury at ?a?tv.net> Apr 29, 2008
- 650 views
pathinfo is simple and nice function. In file names as: FileZilla_3.0.8.1_win32-setup.exe correctly set extension as exe but filenames as: new.tar.gz set extension as gz, wich is only patially truth. DOS had a real 3 bytes field for extension in the directory table, but I think that in modern filesystems the extension concept has not sense. Even unix system prefer to have not any extension and prefer magic numbers for binary and #! for scripts. So, finally, I don't find real utility to the extension field. I prefer that pathinfo must to return: On dos and windows 3 fields: drive, path, filename On Linux/BDS 2 fields: path, filename +-+-+-+-+-+-+-+ Marco A. Achury Caracas, Venezuela