I am learning about atime, ctime, mtime with regard to files and directories. It seems to me that if I modify a file within a directory, I haven't changed the "directory file" itself in its inode or file contents, and therefore ctime and mtime should be unchanged.
But in the following test, the change time and modification time did change when I edited the file. Why did they change?
$ ls
blah.txt test.txt test.txt~
$ cd ..
$ stat -x Write
File: "Write"
Size: 170 FileType: Directory
Mode: (0777/drwxrwxrwx) Uid: ( 501/user) Gid: ( 20/ staff)
Device: 1,4 Inode: 652017 Links: 5
Access: Tue Aug 11 08:20:33 2015
Modify: Tue Aug 11 08:01:49 2015
Change: Tue Aug 11 08:01:49 2015
$ cd Write
$ ls
blah.txt test.txt test.txt~
$ emacs test.txt
$ cd ..
$ stat -x Write
File: "Write"
Size: 170 FileType: Directory
Mode: (0777/drwxrwxrwx) Uid: ( 501/user) Gid: ( 20/ staff)
Device: 1,4 Inode: 652017 Links: 5
Access: Tue Aug 11 08:20:48 2015
Modify: Tue Aug 11 08:20:48 2015
Change: Tue Aug 11 08:20:48 2015