Mac OS X Lion: What is the max path length?

前端 未结 4 1617
小蘑菇
小蘑菇 2020-12-31 04:41

I am having trouble finding this information, and trial and error is telling me that the value is very high. So I figured I ask the community to see if anyone knows and can

4条回答
  •  失恋的感觉
    2020-12-31 05:19

    Old, but I found an answer:

    #include 
    

    and then it'll have a PATH_MAX constant as a #define. In my case,

    char filenameBuffer [PATH_MAX];
    

    You could hardcode 1024 as the maximum path, but using a constant like that makes your code scalable with new releases

提交回复
热议问题