Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. iOS
  4. How to create folder on IOS device in Cordova

How to create folder on IOS device in Cordova

Scheduled Pinned Locked Moved iOS
androidiosmobiletutorialquestion
1 Posts 1 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aravindba
    wrote on last edited by
    #1

    Hi, I am developing ios app, in that need to create folder on ios device, i am using following code to create folder named "FT2019" ,is it my code is correct ? if correct then how see that folder on ios device physically.

    if (device.platform.toLowerCase() == "android") {
    window.resolveLocalFileSystemURL(cordova.file.externalRootDirectory, onFileSystemSuccess, onError);
    } else {
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, onError);
    }

    function onFileSystemSuccess(fileSystem) {
    var entry = "";
    if (device.platform.toLowerCase() == "android") {
    entry = fileSystem;
    } else {
    entry = fileSystem.root;
    }
    entry.getDirectory("FT2019", {
    create: true,
    exclusive: false
    }, onGetDirectorySuccess, onGetDirectoryFail);
    };

        function onError(e) {
            alert("Fail to get folder");
        };
    
    
    
    
        function onGetDirectorySuccess(dir) {
            dummyFilePath = dir.toURL();
        };
    
    
        function onGetDirectoryFail(dir) {
            alert("Fail to get folder");
        };
    

    Regards Aravindb

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups