date - PHP - linux/unix CTIME (inode change time) is being set when it's only being modified -


according to: http://www.php.net/manual/en/function.filectime.php

"in unix filesystems, file considered changed when inode data changed; is, when permissions, owner, group, or other metadata inode updated."

however, running debian linux (uname -r: 2.6.26-2-686) when access , write file, using php's

$fh = fopen($file, 'a'); fwrite($fh, "hello world");  fclose($fh); 

both modified time (filemtime) , change time (filectime) updated. it's understanding ctime changed when file's preferences changed (permissions, ownership, name) , not content itself.

clearstatcache();  echo "$file last changed: " . date("f d y h:i:s.", filectime($file)). "<br>"; echo "$file last modified: " . date("f d y h:i:s.", filemtime($file)). "<br>"; echo "$file last accessed: " . date("f d y h:i:s.", fileatime($file)). "<br>"; 

nevermind, after reading http://www.kavoir.com/2009/04/linux-the-differences-between-file-times-atime-accessed-time-ctime-changed-time-and-mtime-modified-time.html

it states: "ctime – change time, or last changed time of file or directory, whenever change , update file such changing file ownership or permissions or modifying file content, ctime of file updated current time"


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -