Constants that may be used in iOS study Day 11-IO

Source: Internet
Author: User

# Import
 
  
Int main (int argc, const char * argv []) {@ autoreleasepool {// obtain the program root directory NSString * filepath = NSHomeDirectory (); NSLog (@ "filepath program root directory: % @ ", filepath); // obtain the Documents directory NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * thepath = [paths lastObject]; NSLog (@ "Documents Directory: % @", thepath); // obtain the user's desktop directory paths = NSSearchPathForDirectoriesInDomains (nsdomaintopdirectory, NSUserDomainMask, YES); thepath = [paths lastObject]; NSLog (@ "desktop Directory: % @", thepath); // obtain the user Library directory paths = NSSearchPathForDirectoriesInDomains (NSLibraryDirectory, NSUserDomainMask, YES); thepath = [paths lastObject]; NSLog (@ "Library Directory: % @", thepath); // obtain the user's desktop directory paths = NSSearchPathForDirectoriesInDomains (NSCachesDirectory, NSUserDomainMask, YES); thepath = [paths lastObject]; NSLog (@ "desktop Directory: % @", thepath); // obtain the path of the Temporary Folder thepath = NSTemporaryDirectory (); NSLog (@ "temporary directory: % @", thepath ); // obtain the value paths = [thepath pathComponents]; for (int I = 0; I
  
   

   
        //        NSApplicationDirectory = 1,             // supported applications (Applications)//        NSDemoApplicationDirectory,             // unsupported applications, demonstration versions (Demos)//        NSDeveloperApplicationDirectory,        // developer applications (Developer/Applications). DEPRECATED - there is no one single Developer directory.//        NSAdminApplicationDirectory,            // system and network administration applications (Administration)//        NSLibraryDirectory,                     // various documentation, support, and configuration files, resources (Library)//        NSDeveloperDirectory,                   // developer resources (Developer) DEPRECATED - there is no one single Developer directory.//        NSUserDirectory,                        // user home directories (Users)//        NSDocumentationDirectory,               // documentation (Documentation)//        NSDocumentDirectory,                    // documents (Documents)//        NSCoreServiceDirectory,                 // location of CoreServices directory (System/Library/CoreServices)//        NSAutosavedInformationDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 11,   // location of autosaved documents (Documents/Autosaved)//        NSDesktopDirectory = 12,                // location of user's desktop//        NSCachesDirectory = 13,                 // location of discardable cache files (Library/Caches)//        NSApplicationSupportDirectory = 14,     // location of application support files (plug-ins, etc) (Library/Application Support)//        NSDownloadsDirectory NS_ENUM_AVAILABLE(10_5, 2_0) = 15,              // location of the user's "Downloads" directory//        NSInputMethodsDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 16,           // input methods (Library/Input Methods)//        NSMoviesDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 17,                 // location of user's Movies directory (~/Movies)//        NSMusicDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 18,                  // location of user's Music directory (~/Music)//        NSPicturesDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 19,               // location of user's Pictures directory (~/Pictures)//        NSPrinterDescriptionDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 20,     // location of system's PPDs directory (Library/Printers/PPDs)//        NSSharedPublicDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 21,           // location of user's Public sharing directory (~/Public)//        NSPreferencePanesDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 22,        // location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes)//        NSApplicationScriptsDirectory NS_ENUM_AVAILABLE(10_8, NA) = 23,      // location of the user scripts folder for the calling application (~/Library/Application Scripts/code-signing-id)//        NSItemReplacementDirectory NS_ENUM_AVAILABLE(10_6, 4_0) = 99,    // For use with NSFileManager's URLForDirectory:inDomain:appropriateForURL:create:error://        NSAllApplicationsDirectory = 100,       // all directories where applications can occur//        NSAllLibrariesDirectory = 101,          // all directories where resources can occur//        NSTrashDirectory NS_ENUM_AVAILABLE(10_8, NA) = 102                   // location of Trash directory                                    }    return 0;}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.