note 102306 added to function.rmdir

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Linux - If I delete the only file in a directory, then attempt to delete the directory  in the following statement, I get a "Directory not empty" warning. To prevent the warning:

if(is_file(adirectory/afile)) {
   if (unlink(adirectory/afile)) {
      if (is_dir(adirectory))  rmdir(adirectory);
   }
}
----
Server IP: 208.69.120.55
Probable Submitter: 66.214.184.23
----
Manual Page -- http://www.php.net/manual/en/function.rmdir.php
Edit        -- https://master.php.net/note/edit/102306
Del: integrated  -- https://master.php.net/note/delete/102306/integrated
Del: useless     -- https://master.php.net/note/delete/102306/useless
Del: bad code    -- https://master.php.net/note/delete/102306/bad+code
Del: spam        -- https://master.php.net/note/delete/102306/spam
Del: non-english -- https://master.php.net/note/delete/102306/non-english
Del: in docs     -- https://master.php.net/note/delete/102306/in+docs
Del: other reasons-- https://master.php.net/note/delete/102306
Reject      -- https://master.php.net/note/reject/102306
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.