在ColdFusion / CFML中获取文件创建日期时间
原文英文,约200词,阅读约需1分钟。发表于: 。Today I needed to get the time that a file was created from within some CFML code. I had first thought that cfdirectory or directoryList would return this, but it only returns the date the a file...
CFML代码中获取文件创建时间的解决方案是使用Java的NIO文件API,更具体地说是java.nio.file.attribute.BasicFileAttributes实现,它可以返回文件创建、修改和最后访问的日期,但是一些Linux文件系统实现实际上不跟踪最后访问时间,所以可能会得到最后修改的日期。