Get array of directories in documents directory

后端 未结 2 442
囚心锁ツ
囚心锁ツ 2021-02-06 09:45

I am trying to return the list of directories present in an app\'s Documents directory. I am able to get an array containing all files of a given extension (eg .txt files or .pn

2条回答
  •  时光说笑
    2021-02-06 10:29

    Mrueg wrote it all but one thing that

    fileList = [[fM directoryContentsAtPath:DOCUMENTS_FOLDER];
    

    Replace by

    fileList = [fileManager contentsOfDirectoryAtPath:filePath error:nil];
    

提交回复
热议问题