开发者

NSFileManager: Using wildcards to navigate directories

开发者 https://www.devze.com 2023-02-20 15:29 出处:网络
Hey, I need to be able to navigate in a directory structure like eg; \'/folder/folder2/gehrjne/folder3\'

Hey, I need to be able to navigate in a directory structure like eg; '/folder/folder2/gehrjne/folder3'

With 'folder2' containing a bunch of random folder names like 'gehrjne', yet I need to get to eg, folder3.

Using a * in a path doesn't seem to work in NSFileMana开发者_高级运维ger for some reason. Just says there is no directory of such.

Thanks.


you'll have to get the directory's contents, perhaps recursively, then find what you're after from the results -- it doesn't work like a regex.

0

精彩评论

暂无评论...
验证码 换一张
取 消