For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > January 2006 > #35980 [Opn]: touch() works on files but not on directories (on Linux this works perf









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #35980 [Opn]: touch() works on files but not on directories (on Linux this works perf
sniper@php.net

2006-01-12, 6:59 pm

ID: 35980
Updated by: sniper@php.net
Reported By: pavel dot hlousek at gmail dot com
Status: Open
-Bug Type: *Directory/Filesystem functions
+Bug Type: Documentation problem
Operating System: Win2K
PHP Version: 4.4.1
New Comment:

So windows just doesn't support it -> docu prob


Previous Comments:
------------------------------------------------------------------------

[2006-01-12 16:17:05] pavel dot hlousek at gmail dot com

Description:
------------
<?php touch('non-existing-file'); ?> - Correct. Creates a new file.

<?php touch('existing-file'); ?> - Correct. Changes file's mtime.

<?php touch('existing-directory'); ?> - Wrong on Win2K. Does not change
directory's mtime. Correct on Linux. I did not test any other Win32
platforms. Filesystem: NTFS. The user running the script owns
'existing-directory'. safe_mode=Off.

Reproduce code:
---------------
<?php touch('existing-directory'); ?>

Expected result:
----------------
Change mtime of an existing directory.

Actual result:
--------------
Utime failed: Permission denied in <fullpath/to/existing-directory> on
line 1


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35980&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com