在采用了android Onedrive创建目录 [英] create Directory in Onedrive using android

查看:223
本文介绍了在采用了android Onedrive创建目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Microsoft liveSDK为Android在5月份申请。我使用的文件夹创建follwing方法。

Hi I am using Microsoft liveSDK for android in may application. I am using follwing method for folder creation.

LiveOperation postAsync(字符串路径,JSONObject的身体,LiveOperationListener监听器)

LiveOperation postAsync(String path, JSONObject body, LiveOperationListener listener)

我需要在Onedrive。我创建目录(文件夹结构)有absoute路径(如:A / B / C),若A / B已经存在,我要创建文件夹B文件夹内C(不想Overwirte)。有什么方法可用于这一目的。

I need to create directory(folder structure) in Onedrive .I have absoute path(eg: A/B/C).If A/B is already exist, I want to create folder C inside folder B(dont want to Overwirte). Have any method is available for this purpose

感谢

推荐答案

在LiveSDK不支持创建一个文件夹路径的层次结构。你需要创建一个文件夹,获得其ID,然后该路径下创建子文件夹树。

The LiveSDK does not support creating a folders path hierarchy. You'd need to create a folder, get its id, and then create the tree of sub-folders under that path.

有一个OneDrive API,它不支持此功能,请 https://dev.onedrive.com/ ,它允许基于两个路径查找,和路径层次的创作。

There is a OneDrive API that does support this functionality, https://dev.onedrive.com/, which allows for both path based lookup, and path hierarchy creation.

创建一个文件夹工艺类似如下的请求,在这个例子中,我们将在一个请求中创建的文件夹层次的 A> B> C> D>电子

To create a folder craft a request like the following, in this example we will create the folder hierarchy a > b > c > d > e in a single request.

POST https://api.onedrive.com/v1.0/drive/root:/a/b/c/d:/children
Content-Type: application/json

{
    "name":"e",
    "folder":{}
}

这篇关于在采用了android Onedrive创建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆