Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在dropbox xamarin中保存图像或文件?_Ios_Xamarin.ios_Components_Xamarin_Dropbox - Fatal编程技术网

Ios 如何在dropbox xamarin中保存图像或文件?

Ios 如何在dropbox xamarin中保存图像或文件?,ios,xamarin.ios,components,xamarin,dropbox,Ios,Xamarin.ios,Components,Xamarin,Dropbox,我正在尝试在dropbox中保存文档,我已将文档保存在设备上。以及从我的应用程序在dropbox中保存UIImage DBError error; string ruta = Environment.GetFolderPath (Environment.SpecialFolder.Personal); string rutaarchivo = Path.Combine(ruta,"Geodesia.xml"); DBPath newPat

我正在尝试在dropbox中保存文档,我已将文档保存在设备上。以及从我的应用程序在dropbox中保存UIImage

    DBError error;

        string ruta = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
        string rutaarchivo = Path.Combine(ruta,"Geodesia.xml");
        DBPath newPath = DBPath.Root.ChildPath(rutaarchivo);
        DBFile archivo = DBFilesystem.SharedFilesystem.CreateFile (newPath,out error);
我正在使用此代码,但只创建文件,有人帮我吗???

根据,CreateFile只打开文件。您需要使用WriteContentsOfFile将其他文件的内容复制到其中

例如:

archivo.WriteContentsOfFile(rutaarchivo, false); 

谢谢你的帮助,我找到了另一种方法,我用这段代码为image archivo.WriteData image.AsPNG,out error;这是文件archivo.WriteData rutaachivo的输出错误;祝您有个美好的一天!!