---
title: "列出程序目录中的指定文件夹的所有文件"
author: "yourgame"
date: "2012-02-06T01:56:52Z"
tags: []
categories: ["移动开发"]
slug: "untitled"
draft: false
lastmod: "2012-02-06T01:56:52Z"
id: 1393919
url: "https://yourgame.iteye.com/blog/1393919"
---

```java

    NSFileManager *m = [nsfilemanager defaultmanager];
    NSArray *fileList = [m directorycontentsatpath:[[[[nshomedirectory() stringbyappendingpathcomponent:@"documents"]
                                                      stringByAppendingPathComponent:@"163"] 
                                                     stringByAppendingPathComponent:@"songzi"] stringByAppendingPathComponent:@"pictures"]];
    for (NSString *s in fileList){
        NSLog(s);
    }
    

```