Professional Web Applications Themes

Can't find my files - Mac Programming

I have some difficulties understanding file IO on this system. I developped a loadable bundle, where I Create and save files without errors, but I cannot find those files anywhere in the system when I search with the finder. The specifics are: For creator I have use the kNavGenericSignature. For Filetype I use '.BMP' as it is a BMP image file. For VRefNum and ParId I used 0. As I am not yet confortable with these I assumed it should refer to the current dir... Thanks, Denis...

  1. #1

    Default Can't find my files

    I have some difficulties understanding file IO on this system.

    I developped a loadable bundle, where I Create and save files without
    errors, but I cannot find those files anywhere in the system when I search
    with the finder.

    The specifics are:
    For creator I have use the kNavGenericSignature.
    For Filetype I use '.BMP' as it is a BMP image file.

    For VRefNum and ParId I used 0. As I am not yet confortable with these I
    assumed it should refer to the current dir...

    Thanks,

    Denis



    Denis Guest

  2. #2

    Default Re: Can't find my files

    In article <vif.com>, "Denis Work" <net>
    wrote:
     

    Don't. Decide where you want the files to be, and put the files there. vrefnum
    and parID of zero will give you random behavior (probably the file ended up
    inside your bundle).

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: Can't find my files

    Thanks,

    Is there like a global standard number that would refer to a particullar
    place.

    Or is there a function that will give me those number for a temporary place.
    Like in Windows : GetTempDir(...);

    Denis

    "Miro Jurisic" <org> wrote in message
    news:mit.edu... 
    <net> 
    >
    > Don't. Decide where you want the files to be, and put the files there.[/ref]
    vrefnum 
    up 


    Denis Guest

  4. #4

    Default Re: Can't find my files

    In article <vif.com>, "Denis Work" <net>
    wrote:
     

    FSFindFolder(kUserDomain, kTemporaryItemsType, kCreateFolder, ...)

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  5. #5

    Default Re: Can't find my files

    Thanks again.

    "Miro Jurisic" <org> wrote in message
    news:mit.edu... 
    <net> 
    >
    > FSFindFolder(kUserDomain, kTemporaryItemsType, kCreateFolder, ...)
    >
    > meeroh
    >
    > --
    > If this message helped you, consider buying an item
    > from my wish list: <http://web.meeroh.org/wishlist>
    >[/ref]


    Denis Guest

  6. #6

    Default Re: Can't find my files

    The function FSFindFolder return a hidden piece of something.
    It does not give me a ParID and and vRefnum for my files.

    Denis

    "Denis Work" <net> wrote in message
    news:vif.com... 
    > <net> [/ref][/ref]
    particullar 
    > >
    > > FSFindFolder(kUserDomain, kTemporaryItemsType, kCreateFolder, ...)
    > >
    > > meeroh
    > >
    > > --
    > > If this message helped you, consider buying an item
    > > from my wish list: <http://web.meeroh.org/wishlist>
    > >[/ref]
    >
    >[/ref]


    Denis Guest

  7. #7

    Default Re: Can't find my files

    In article <vif.com>,
    "Denis Work" <net> wrote:
     

    It gives you a FSRef for the folder. If you want a FSRef for a file
    contained within, call FSMakeFSRefUnicode. If you want to create a file
    within the folder, call FSCreateFileUnicode.

    -Chad
    Chad Guest

  8. #8

    Default Re: Can't find my files

    All I want is the vRefnum and ParId that I can use for my call to
    HCreate(...)
    if it does not already exist...

    Denis

    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... 
    >
    > It gives you a FSRef for the folder. If you want a FSRef for a file
    > contained within, call FSMakeFSRefUnicode. If you want to create a file
    > within the folder, call FSCreateFileUnicode.
    >
    > -Chad[/ref]


    Denis Guest

  9. #9

    Default Re: Can't find my files

    In article <vif.com>,
    "Denis Work" <net> wrote:
     

    HCreate is completely outdated. Use FSCreateFlieUnicode.

    -Chad
    Chad Guest

  10. #10

    Default Re: Can't find my files

    Perhaps but what you're suggeting does not fit well either.

    First in order to decide to create or happend to a file I need to detect if
    the file already exist...
    Which I used "HGetFInfo(...)" which also need the vRefnum and ParId.

    And second, now I am stuck to provide an FSRef...

    Like a runon sentence or worst an endless loop.


    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... 
    >
    > HCreate is completely outdated. Use FSCreateFlieUnicode.
    >
    > -Chad[/ref]


    Denis Guest

  11. #11

    Default Re: Can't find my files

    In article <vif.com>,
    "Denis Work" <net> wrote:
     

    It's no easier to see if a file exists using those antiquated api's than
    using the newer ones. In fact using FSRefs is simpler.

    * Get a FSRef for the parent.
    * Call FSMakeFSRefUnicode to find the child file. If it does not exist,
    the call will fail with result fnfErr.
    * Proceed down your logic tree from there.

    It's circular reasoning to say you need to stick with HCreate because
    you also want to call HGetFInfo. That call is also totally out of date.
    It has been replaced by FSGetCatalogInfo.

    I very much doubt that what you want to do can not be done with the
    FSRef-based API's.

    -Chad
    Chad Guest

  12. #12

    Default Re: Can't find my files

    Perhaps but what you're suggesting does not fit well either.

    First in order to decide to create or happend to a file I need to detect if
    the file already exist...
    Which I used "HGetFInfo(...)" which also need the vRefnum and ParId.

    And second, now I am stuck to provide an FSRef...

    Like a runon sentence or worst an endless loop.


    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... 
    >
    > HCreate is completely outdated. Use FSCreateFlieUnicode.
    >
    > -Chad[/ref]


    Denis Guest

  13. #13

    Default Re: Can't find my files

    Well, having to send tones of irrelevants parmeters is not what I call
    simpler nor easier.

    There is also such a thing as portable codes I will not redesign and rewrite
    entire software, because Apple did not provide the right functions for this
    purpose.

    Beside if you look closer to twain doc. which is what I am working on, it
    only work with ParId and vRefNum.

    Also there must be a way because the BSD and console works by path.

    It is just too bad that apperently it does not come with the box.

    Denis


    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... 
     


    Denis Guest

  14. #14

    Default Re: Can't find my files

    In article <vif.com>,
    "Denis Work" <net> wrote:
     

    OK, once again people have tried to help by telling you to stop using
    the hammer as a driver, and once again you have continued to curse
    the hammer for not being a driver.

    Can you let me know the name of the project you are working on? I want
    to make sure I never use it.

    -Chad
    Chad Guest

  15. #15

    Default Re: Can't find my files

    Ok, I was trying to stay polite. Now I am not.

    Of course it only goes when cursing Windows...

    You don't seems to be conscient when you are insulting the other.
    You are like a boxer That can only give hit, never expect to receive one.

    Don't worry if it was just for me, there would not be any product on that
    hammer.

    Beside, I can curse it all I want, since, it really deserves it.

    Denis

    If it was just me...
    I would tell you the name of the product, nothing would please me more than
    not sell it on that platform.
    So the marketing dept. would leave me alone and drop it.
    Believe me I would tell you gladly...

    I hate working with that junk!

    N.B. You started it.




    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... [/ref]
    rewrite [/ref]
    this [/ref]
    it 
    >
    > OK, once again people have tried to help by telling you to stop using
    > the hammer as a driver, and once again you have continued to curse
    > the hammer for not being a driver.
    >
    > Can you let me know the name of the project you are working on? I want
    > to make sure I never use it.
    >
    > -Chad[/ref]




    Denis Guest

  16. #16

    Default Re: Can't find my files

    In article <vif.com>,
    "Denis Work" <net> wrote:
     

    I sense that english is not your native language. Please look up the
    word "polite" in a dictionary, it obviously does not mean what you think
    it does.
     

    I have no idea what you are talking about. I haven't mentioned windows.
     

    I posted two messages, both stating that the API you are trying to use
    is very old and has been replaced. How that is an insult to you, I don't
    know, but as usual you responded with nothing but contempt for anyone
    who tried to help you.
     

    Please, please, PLEASE see if you can get marketing to approve telling
    us the name. I'm sure we could help you reach your goal.

    You want an insult? Here's one. Anything you write is going to be so
    clunky and bug-ridden that it could serve no other purpose than to
    crash. How you got hired in any professional capacity is beyond me.

    THAT is an insult (though a true one). Telling you to use
    FSMakeFSRefUnicode is not an insult.
     

    Yes, I can see how telling you the names of API's might really offend
    you, especially considering the fact that you ASKED for them.

    -Chad

    P.S. Go FSCreateResFile, you CFStringCreateWithCString!
    Chad Guest

  17. #17

    Default Re: Can't find my files

    Thank you,

    Denis

    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... 
    >
    > I sense that english is not your native language. Please look up the
    > word "polite" in a dictionary, it obviously does not mean what you think
    > it does.

    >
    > I have no idea what you are talking about. I haven't mentioned windows.
    > [/ref]
    one. [/ref]
    that [/ref]
    than 
    >
    > Please, please, PLEASE see if you can get marketing to approve telling
    > us the name. I'm sure we could help you reach your goal.
    >
    > You want an insult? Here's one. Anything you write is going to be so
    > clunky and bug-ridden that it could serve no other purpose than to
    > crash. How you got hired in any professional capacity is beyond me.
    >
    > THAT is an insult (though a true one). Telling you to use
    > FSMakeFSRefUnicode is not an insult.

    >
    > Yes, I can see how telling you the names of API's might really offend
    > you, especially considering the fact that you ASKED for them.
    >
    > -Chad
    >
    > P.S. Go FSCreateResFile, you CFStringCreateWithCString![/ref]


    Denis Guest

  18. #18

    Default Re: Can't find my files

    I just check the word polite on webster.com and it is exactly on the money.

    Etymology: Latin politus, from past participle of polire
    1 a : of, relating to, or having the characteristics of advanced culture b :
    marked by refined cultural interests and pursuits especially in arts and
    belles lettres
    2 a : showing or characterized by correct social usage b : marked by an
    appearance of consideration, tact, deference, or courtesy c : marked by a
    lack of roughness or crudities <polite literature>


    As for your insult, nice try, but I have plenty of references that has a
    very very different oppinion.

    For the other part, I have never inulted you personnally in a first place,
    insulted Apple yeah of course, but you are not Apple.
    Please please, PLEASE see the difference.
    On the other hand what you said about my product and the one I am working
    on... That looks like personnal to me. You should have more understanding of
    the frustration about programming, especially when crossing from another
    platform.


    Thanks again.
    Denis




    "Chad J McQuinn" <andthistoo.insightbb.com> wrote in
    message news:comcast.net... 
    >
    > I sense that english is not your native language. Please look up the
    > word "polite" in a dictionary, it obviously does not mean what you think
    > it does.

    >
    > I have no idea what you are talking about. I haven't mentioned windows.
    > [/ref]
    one. [/ref]
    that [/ref]
    than 
    >
    > Please, please, PLEASE see if you can get marketing to approve telling
    > us the name. I'm sure we could help you reach your goal.
    >
    > You want an insult? Here's one. Anything you write is going to be so
    > clunky and bug-ridden that it could serve no other purpose than to
    > crash. How you got hired in any professional capacity is beyond me.
    >
    > THAT is an insult (though a true one). Telling you to use
    > FSMakeFSRefUnicode is not an insult.

    >
    > Yes, I can see how telling you the names of API's might really offend
    > you, especially considering the fact that you ASKED for them.
    >
    > -Chad
    >
    > P.S. Go FSCreateResFile, you CFStringCreateWithCString![/ref]


    Denis Guest

  19. #19

    Default Re: Can't find my files

    In article <vif.com>,
    "Denis Work" <net> wrote:
     

    OK, OK, calm down a minute here. Take a deep breath. Really, this
    isn't all that hard. :)

    Let's see if I've got this straight. You're interested in creating
    files and locating them afterwards, ideally by path, and then at some
    point getting a vRefNum and parID for those files. You've been told how
    to do most of this already, but I'll try to rephrase it for you.

    First, if you want to deal with files by path in the way the BSD APIs
    do, go right ahead and use the BSD APIs. They work fine. You can go
    between a BSD path and an FSRef if necessary with FSPathMakeRef and
    FSRefMakePath.

    If you want to find the temporary items folder, use FSFindFolder. It'll
    give you an FSRef. Again, you can get a path from that FSRef with
    FSRefMakePath, or just keep using the FSRef-based APIs.

    You can get a parID and vRefNum for a file by getting its FSSpec. You
    can get an FSSpec from an FSRef by calling FSGetCatalogInfo. Don't be
    afraid of the zillion arguments it allows, since if all you want is the
    FSSpec you can pass NULL for most of them.

    That should be all you need. It's really quite simple. Of course, it'd
    be easier if the TWAIN folks updated their API to be modern, but that's
    really not Apple's fault. :)

    -Eric

    --
    Eric Albert stanford.edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  20. #20

    Default Re: Can't find my files

    Well, Apparantly Apple dev team was on this, at least that's what I have
    been told on the twain.org.

    I will study your approach and let you know.

    Thanks,

    Denis

    "Eric Albert" <stanford.edu> wrote in message
    news:.. [/ref]
    rewrite [/ref]
    this [/ref]
    it 
    >
    > OK, OK, calm down a minute here. Take a deep breath. Really, this
    > isn't all that hard. :)
    >
    > Let's see if I've got this straight. You're interested in creating
    > files and locating them afterwards, ideally by path, and then at some
    > point getting a vRefNum and parID for those files. You've been told how
    > to do most of this already, but I'll try to rephrase it for you.
    >
    > First, if you want to deal with files by path in the way the BSD APIs
    > do, go right ahead and use the BSD APIs. They work fine. You can go
    > between a BSD path and an FSRef if necessary with FSPathMakeRef and
    > FSRefMakePath.
    >
    > If you want to find the temporary items folder, use FSFindFolder. It'll
    > give you an FSRef. Again, you can get a path from that FSRef with
    > FSRefMakePath, or just keep using the FSRef-based APIs.
    >
    > You can get a parID and vRefNum for a file by getting its FSSpec. You
    > can get an FSSpec from an FSRef by calling FSGetCatalogInfo. Don't be
    > afraid of the zillion arguments it allows, since if all you want is the
    > FSSpec you can pass NULL for most of them.
    >
    > That should be all you need. It's really quite simple. Of course, it'd
    > be easier if the TWAIN folks updated their API to be modern, but that's
    > really not Apple's fault. :)
    >
    > -Eric
    >
    > --
    > Eric Albert stanford.edu
    > http://rescomp.stanford.edu/~ejalbert/[/ref]


    Denis Guest

Page 1 of 2 12 LastLast

Similar Threads

  1. how to find files less than a day old?
    By Brian in forum FreeBSD
    Replies: 7
    Last Post: March 30th, 03:19 PM
  2. help: can't find external files
    By nike in forum Macromedia Director Lingo
    Replies: 3
    Last Post: December 4th, 04:19 PM
  3. find files
    By e.group in forum Sun Solaris
    Replies: 18
    Last Post: September 19th, 11:54 AM
  4. where could i find .fla files?
    By !.........................! in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: July 15th, 11:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139