Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7889757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:10:48+00:00 2026-06-03T06:10:48+00:00

I have the following line of code in my program which I took from

  • 0

I have the following line of code in my program which I took from the Forth edition of Stephen G. Kochan’s book “Programming in Objective-C:

[fileManager createDirectoryAtPath:DATABASE_DIRECTORY attributes:nil];

Note: “fileManager” is my fm variable, and DATABASE_DIRECTORY is a #define of my path.

While it works perfectly fine (I’m running OSX 10.6.8), every time I compile I am reminded that:

"createDirectoryAtPath:attributes:" is deprecated

I’ve looked over the reference document for the file manager, and it is a bit overwhelming for a newbie to Cocoa Programming. Regardless, that particular method is no longer listed in the only filemanager reference docs I could find (https://developer.apple.com/library/mac/#documentation/Carbon/Reference/File_Manager/Reference/reference.html) It is not even listed as “deprecated”. It’s just not there at all.

Clearly, it still works, but obviously the idea is to utilize a different and more modern way of creating a directory (I noticed that the filemanager reference is a Carbon vs. Cocoa reference. I have not tried running this on Lion yet to see if it still works.)

Is there a direct replacement for this deprecated method?

If not, is Apple trying to do away with path names and instead switch over to Unicode entirely? (Forgive me if I’m a bit confused on this issue and terminology… I haven’t written code since the late 80’s…) I have never really used Unicode for anything in the past so I wouldn’t know where to begin.

If anyone can recommend a good current primer on Unicode and/or programming code to read/write files in Cocoa, it would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:10:50+00:00Added an answer on June 3, 2026 at 6:10 am

    What Apple is doing is moving away from paths toward URLs — I don’t know if they will go all the way, but they do seem to be depreciating quite a few of the path methods in favor of URL ones. The replacement for createDirectoryAtPath:attributes: is createDirectoryAtURL:withIntermediateDirectories:attributes:error:

    I’m not sure why you couldn’t find that in the docs, if you search for createDirectoryAtPath:attributes: it takes you to the depreciated methods and in that reference it points you to the replacement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code which is executed from the command line: import cgi,time,os,json,sys,zipfile,urllib2
I have the following line of code which when compiled with GHC it goes
I have the following line of code which works fine locally, but breaks when
I have a unit test which contains the following line of code Site.objects.get(name=UnitTest).delete() and
I have the following line of code in my program public Chromosome NewChromosome {
I have the following code which uses one of the JTextAreas from an array
I have following line of code to generate local notification after every 1 minute
I have the following line of code: public bool dcpl_radar() { if (radar ==
I have the following line of code called very often: var configValue = System.Configuration.ConfigurationManager.AppSettings[ConfigValueKey];
I have the following line of code. <%= Html.Encode(string.Join(, , item.company1.companies.Select(x => x.company_name).ToArray())) %>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.