paraworld.file.CreateFile

Description

创建用户文件。文件只可放在当前用户自己的文件夹中

Parameters

Required Name Type Description
required sessionKey string 用户凭证。
fileUrl string 该文件所在的URL地址
filePath string 该文件所在的物理地址
optional overwrite int 若指定目录中已存在同名的文件,是否用新的文件覆盖旧的文件。0:否,1:是。如果为否,当存在同名文件时,创建文件的操作将会失败,并返回410错误

Example Return XML

<msg xmlns="">
        <isSuccess type="boolean">True</isSuccess>
</msg>

Error Codes

当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录 410:文件已存在

Test Cases

case 1

Input:

{

        ["fileUrl"]="http://www.para5.com/img/test.jpg",

        ["filePath"]="map/test.jpg",

        ["sessionKey"]="dec79cec-a151-476f-954f-027ef8ddac2a",

}

Result:

{

        ["isSuccess"]=true,

}
Topic revision: r5 - 2008-05-13 - 15:06:30 - CaoYF
Main.Paraworld_file_CreateFile moved from Main.Paraworld_UserFile_Create on 2008-05-10 - 05:30 by LiXizhi - put it back
 

ParaEngine Developer Network

This site is powered by the TWiki collaboration platformCopyright © 2004-2008 ParaEngine Corporation
Ideas, requests, problems regarding ParaEngine platform Send feedback