+ Reply
Results 1 to 4 of 4

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: TouchBar Help. Creating Folder.

is a discussion within the

iPhone / iPod Touch SDK | Development Discussion

forums, a part of the

3rd Party Apps For iPhone | iPod Touch

section;
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
...
  1. #1
    What's Jailbreak?
    Join Date
    Mar 2008
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default TouchBar Help. Creating Folder.
    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.

  2. #2
    Developer NetMage's Avatar
    Join Date
    Aug 2007
    Location
    Virginia
    Posts
    1,296
    Thanks
    72
    Thanked 210 Times in 168 Posts

    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

  3. #3
    What's Jailbreak?
    Join Date
    Mar 2008
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    thanks.
    worked

  4. #4
    What's Jailbreak?
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hmm, really thanks for sharing us this great information..............
    Its really very useful info...........
    Last edited by Kallis000; 01-28-2014 at 02:06 AM.

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