Trouble using createFileAtPath method to create file (revisited)

  • Hi,
    I posted a question before about not being able to create a file using
    method createFileAtPath, however I never got an answer about how to get the
    reason why the file wasn't created. So, how do I get the error code? Thanks!

    --
    -Jaime
    http://www.jaimerios.com
  • > I posted a question before about not being able to create a file using
    > method createFileAtPath, however I never got an answer about how to get the
    > reason why the file wasn't created. So, how do I get the error code? Thanks!

      You may want to provide a link to the discussion in the archives or
    restate all the details you have in this one; make it easy for people
    to help you.

      As to your question, nothing about that method in the documentation
    mentions anything at all about error codes. It only returns a boolean
    representing success or failure. That would suggest you might need to
    use a different method or perform some error checking before
    attempting to write if you still want to use that method.

    --
    I.S.
  • Hi,
    I'm not familiar with how to create a link to the original post. The subject
    of the post is the same as this one, except for the word "(revisisted)".

    --
    -Jaime
    http://www.jaimerios.com

    On 10/18/07, I. Savant <idiotsavant2005...> wrote:
    >
    >> I posted a question before about not being able to create a file using
    >> method createFileAtPath, however I never got an answer about how to get
    > the
    >> reason why the file wasn't created. So, how do I get the error code?
    > Thanks!
    >
    > You may want to provide a link to the discussion in the archives or
    > restate all the details you have in this one; make it easy for people
    > to help you.
    >
    > As to your question, nothing about that method in the documentation
    > mentions anything at all about error codes. It only returns a boolean
    > representing success or failure. That would suggest you might need to
    > use a different method or perform some error checking before
    > attempting to write if you still want to use that method.
    >
    > --
    > I.S.
    >
  • On 10/18/07, Jaime Rios <xdev74...> wrote:
    > Hi,
    > I'm not familiar with how to create a link to the original post. The subject
    > of the post is the same as this one, except for the word "(revisisted)".

      Step 1: Search this list's archives for your original message.
      Step 2: Copy the link.
      Step 3: Paste the link into this thread.

      Asking others to search the archives for you to find out the details
    of your question will probably just result in your question being
    ignored. As I said, make it easier for people to help you and you'll
    likely get good help.

      Have you considered my previous advice? Have you looked for other
    ways to write data to a file that might pass back any errors
    encountered?

    --
    I.S.
  • Hi,
    Thanks for the tip; here is the link to the older posting:

    http://lists.apple.com/archives/Cocoa-dev/2007/Oct/msg00640.html

    As for your suggestion, I have tried writing data to a file, even if it
    doesn't exist, with the atomic option turned on and it seems to be able to
    write the file every single time... which to me is weird.

    I would still like to know why I couldn't create the file using
    createFileAtPath and if there are any samples available for troubleshooting
    this, I would appreciate it. Thanks!

    --
    -Jaime
    http://www.jaimerios.com

    On 10/18/07, I. Savant <idiotsavant2005...> wrote:
    >
    > On 10/18/07, Jaime Rios <xdev74...> wrote:
    >> Hi,
    >> I'm not familiar with how to create a link to the original post. The
    > subject
    >> of the post is the same as this one, except for the word "(revisisted)".
    >
    > Step 1: Search this list's archives for your original message.
    > Step 2: Copy the link.
    > Step 3: Paste the link into this thread.
    >
    > Asking others to search the archives for you to find out the details
    > of your question will probably just result in your question being
    > ignored. As I said, make it easier for people to help you and you'll
    > likely get good help.
    >
    > Have you considered my previous advice? Have you looked for other
    > ways to write data to a file that might pass back any errors
    > encountered?
    >
    > --
    > I.S.
    >
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today