获取目录中的文件数 [英] Get the count of files in a directory

查看:117
本文介绍了获取目录中的文件数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何计算目录中的文件?我不能在 NSFileManager 的类引用中找到任何相关的。

How can I count the files in a directory? I couldn't find anything relevant in the class reference of NSFileManager.

推荐答案

contentsOfDirectoryAtPath:error:返回 NSArray 。只需发送 count 到数组。

contentsOfDirectoryAtPath:error: returns an NSArray. Just send count to the array.

这篇关于获取目录中的文件数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆