note 48810 added to function.dirname

From: Date: Fri, 07 Jan 2005 17:13:54 +0000
Subject: note 48810 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-82911@lists.php.net to get a copy of this message
There is no distinction between a directory and a file. This is how dirname() and basename() work. A directory *is* a file. There is no such thing as a path to a non-existing file. The path '/home/users/bob/' refers to the file 'bob' in directory '/home/users/', not the file '' in directory '/home/users/bob/'. This is trivial. Given the path '/etc/conf/sample', there is no way of determining whether 'sample' is a file or a directory just by looking at it. Think about that. ---- Manual Page -- http://www.php.net/manual/en/function.dirname.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48810 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48810&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48810&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48810&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48810&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48810&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48810&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48810&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82911) next »