gpt4 book ai didi

coldfusion - 如何在 ColdFusion 7 中获取文件属性?

转载 作者:行者123 更新时间:2023-12-02 05:35:31 27 4
gpt4 key购买 nike

我找不到告诉我给定文件属性的函数。我特别需要获取文件的大小。我如何找到此信息?

编辑:

我想我找到了答案,但不是我希望得到的答案:

So far till ColdFusion 7, there was no good way to find information like size, last modified date etc about a file. Only way you could do that was to use cfdirectory tag to list the directory, get the query from it, loop over the query until you hit the desired file and then fetch the required metadata. http://coldfused.blogspot.com/2007/07/new-file-io-in-coldfusion-8-part-ii.html

有人知道更好的方法吗?

最佳答案

我相信 cfdirectory 是最简单的答案 - 但请注意,您可以使用 filter 属性作为文件名,而不必循环遍历结果。

关于coldfusion - 如何在 ColdFusion 7 中获取文件属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2562396/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com