From: <var...@us...> - 2010-06-17 13:23:06
|
Revision: 7543 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7543&view=rev Author: vargenau Date: 2010-06-17 13:22:59 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Mac OS 9 is dead Modified Paths: -------------- trunk/lib/FileFinder.php Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2010-06-17 11:37:30 UTC (rev 7542) +++ trunk/lib/FileFinder.php 2010-06-17 13:22:59 UTC (rev 7543) @@ -63,8 +63,7 @@ return $result; } else { if (isWindows() or $this->_isOtherPathsep()) { - if (isMac()) $from = ":"; - elseif (isWindows()) $from = "\\"; + if (isWindows()) $from = "\\"; else $from = "\\"; // PHP is stupid enough to use \\ instead of \ if (isWindows()) { @@ -119,7 +118,6 @@ if (!empty($this->_pathsep)) return $this->_pathsep; elseif (isWindowsNT()) return "/"; // we can safely use '/' elseif (isWindows()) return "\\"; // FAT might use '\' - elseif (isMac()) return ':'; // MacOsX is / // VMS or LispM is really weird, we ignore it. else return '/'; } @@ -140,9 +138,6 @@ if (isWindows95()) { if (empty($path)) return "\\"; else return (strchr($path,"\\")) ? "\\" : '/'; - } elseif (isMac()) { - if (empty($path)) return ":"; - else return (strchr($path,":")) ? ":" : '/'; } else { return $this->_get_syspath_separator(); } @@ -175,13 +170,8 @@ * @return bool New path (destructive) */ function _strip_last_pathchar(&$path) { - if (isMac()) { - if (substr($path,-1) == ':' or substr($path,-1) == "/") - $path = substr($path,0,-1); - } else { - if (substr($path,-1) == '/' or substr($path,-1) == "\\") - $path = substr($path,0,-1); - } + if (substr($path,-1) == '/' or substr($path,-1) == "\\") + $path = substr($path,0,-1); return $path; } @@ -579,21 +569,6 @@ return $winnt; } -/** - * This is for the OLD Macintosh OS, NOT MacOSX or Darwin! - * This has really ugly pathname semantics. - * ":path" is relative, "Desktop:path" (I think) is absolute. - * FIXME: Please fix this someone. So far not supported. - */ -function isMac() { - return (substr(PHP_OS,0,9) == 'Macintosh'); // not tested! -} - -// probably not needed, same behaviour as on unix. -function isCygwin() { - return (substr(PHP_OS,0,6) == 'CYGWIN'); -} - // Local Variables: // mode: php // tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |