max length of file name

前端 未结 1 1826
清歌不尽
清歌不尽 2021-02-18 22:27

i am using the code below to save an image in the NSDocumentDirectory

-(BOOL)saveImage:(UIImage *)image name:(NSString *)name{

    NSString *dir =          


        
1条回答
  •  青春惊慌失措
    2021-02-18 23:25

    Taking a look at the PATH_MAX constant in syslimits.h:91

    ... 
    #define PATH_MAX         1024   /* max bytes in pathname */
    ...
    

    You can test this yourself by doing :

    NSLog(@"%i", PATH_MAX);
    

    just to make sure.

    0 讨论(0)
提交回复
热议问题