1. heavyd's Avatar
    I am the developer of TouchBar, a native bar drinks app.

    And i am seeking help from anyone who can take a second to help me.

    My problem is that i need my application to create a folder if it does ot find it.

    example.

    I need /var/mobile/Library/TouchBar/

    and if it dosent find it (WITCH IT SHOULDENT AT FIRST START)

    create it.

    MY APP IS WRITING WITH JIGGY. THEREFOR USING JAVASCRIPT.

    if anyone can help, please.
    2008-06-15 10:20 PM
  2. NetMage's Avatar
    Seems like you should be able to use the FileManager plugin to do everything you need?

    Plugins.load( "FileManager");
    if (!FileManager.directoryExists('/var/mobile/Library/TouchBar')) {
    FileManager.createDirectory('/var/mobile/Library/TouchBar');
    }

    Note that referencing /var/mobile directly is not a good idea - you should be doing
    var myDir = Application.userLibraryDirectory + '/TouchBar';
    if (!FileManager.directoryExists(myDir)) {
    FileManager.createDirectory(myDir);
    }


    Also note: I don't use Jiggy, so this is all speculation...
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage
    2008-06-16 05:43 AM
  3. heavyd's Avatar
    thanks.
    worked
    2008-06-16 07:51 PM
  4. Kallis000's Avatar
    Hmm, really thanks for sharing us this great information..............
    Its really very useful info...........
    Last edited by Kallis000; 2014-01-28 at 10:06 AM.
    2014-01-21 06:43 AM
LINK TO POST COPIED TO CLIPBOARD