0

I want to detect a particular dropbox path is file or not using android core API.how come this possible ? Any help is appreciated.

1

1 Answer 1

1

I found the snippet

The isDir field on DropboxAPI.Entry tells you if the Entry is a file or folder.

        // Get the metadata for a directory
        Entry dirent = mApi.metadata(mPath, 1000, null, true, null);

        if (!dirent.isDir || dirent.contents == null) {
            // It's not a directory, or there's nothing in it
            mErrorMsg = "File or empty directory";
        }

Also posting Directory create and delete methods available in DropboxAPI

mApi.createFolder(directory_path);
mApi.delete(directory_or_file_path);

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.