Created
August 11, 2011 17:01
-
-
Save probablycorey/1140188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local path = NSDocumentDirectory .. "/SomeDirectoryName" | |
| local err = nil -- use err (instead of error) as the var name because error is a global lua function | |
| if not NSFileManager:defaultManager():fileExistsAtPath(path) then | |
| if not NSFileManager:defaultManager():fileManager:createDirectoryAtPath_withIntermediateDirectories_attributes_error(path, false, nil, err) then | |
| puts("Create directory error %s", err:localizedDescription()) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment