Writing to ˜/Library/Application Support/

  • Hi there
    I'm stuck for months with the same problem I really don't know what to do.
    I'd like to store some prefs/files (images) in some directory for my app and the dirs and files are just not created when I try, but, again, I have no clue about how to do it on MacOS (High Sierra)
    If I use


    A directory SiliceEtSynapses is created as well as a SyntagmaToons subdirectory in ˜/Library/Application Support/ but then I can't get to write anything inside it.
    whether I use

    "/Users/"+GetEnv("USER")+"/Library/Application Support/SiliceEtSynapses/SyntagmaToons/"



    as a path to create stuff using CreateDir for example.

    What am I doing wrong?
    Thanks if you can help before I go crazy!

    EDIT : Using


    does copy the image inside /Library/Application Support/SiliceEtSynapses/SyntagmaToons/ but using CreateDir for example does nothing

    EDIT 2 : OK in fact I can create a text file and append some text to it inside cerberus://internal/ but I can't create /or copy/ any folder to that directory why is it so?

    Edited 5 times, last by Pierrou (May 1, 2021 at 12:29 PM).

  • I tried the example from the helpfile for the filesystem module and couldn't create folders either. I am on Big Sur.
    Sorry, but my knowledge with macOs is very limited, so I can't help with that.

  • Looks like a bug to me or at least a missing feature. Will try to add it.

  • Thanks a lot to both of you!
    I can use a workaround avoiding to create folders but I guess it would be nice if CreateDir/CopyDir could work on MacOS too.
    (EDIT : this is the last issue preventing me from releasing a Mac version of my latest app so more sales [and more trouble] ahead)

  • Btw. "cerberus://internal/" get translated to

    String( getenv( "HOME" ) )+"/Library/Application Support";

    on Apple. I think that differs from "/Users/"+GetEnv("USER")+"/Library/Application Support/"

  • Nevermind, I think you reach to the same place. Anyway, there was a bug inside CreateDir.

    In modules/brl/filesystem.cxs please replace the CreateDir function with this one:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!