cancel
Showing results for 
Search instead for 
Did you mean: 

Accesing files from a server in a MDK app

fjcarrasco
Active Participant
0 Kudos

Hello experts,

I have a requeriment where I need to open some documents in a file server from my MDK app.

In iOS App Files, I can connect to the server and it creates a new location where I can see the folders/files. Even this new location is visible too in others apps.

Example:

My question is if I can use the nativescript FileSystem module to access this location. In case I can, ¿How should I set this location to get the root content ? I have this:

documents = fileSystemModule.knownFolders.documents();
documents.getEntities()
    .then((entities) => {
        // entities is array with the document's files and folders.
        entities.forEach((entity) => {
            array.push(
                {
                    name: entity.name,
                    path: entity.path,
                    lastModified: entity.lastModified.toString()
                }
            );
        });
    }).catch((err) => {
        // Failed to obtain folder's contents.
        console.log(err.stack);
    });

Thanks

Regards,

Kiko

View Entire Topic
antonio_rodriguez9
Participant

hello

@ming kho, is there any other way to put inside the app mdk these files documentation, for instance sharepoint, onedrive, etc.

we have a lot of technical documentation about equipment and we want to give direct access from our MDK app that we have developed.

Thanks.

Antonio