示例#1
0
        public override bool SendFile(string SourceFilePath, string FilePath)
        {
            string destinationpath = FilePath.Substring(0, FilePath.Length - FilePath.Split('\\')[FilePath.Split('\\').Length - 1].Length);

            if (!MediaD.DirectoryExists("sdcard\\" + destinationpath))
            {
                MediaD.CreateDirectory("sdcard\\" + destinationpath);
            }

            if (MediaD.FileExists("sdcard\\" + FilePath))
            {
                MediaD.DeleteFile("sdcard\\" + FilePath);
            }

            using (FileStream fsSource = new FileStream(SourceFilePath, FileMode.Open, FileAccess.Read))
            {
                MediaD.UploadFile(fsSource, "sdcard\\" + FilePath);
            }
            return(true);
        }
示例#2
0
 public override bool CheckFolderExists(string FolderPath)
 {
     return(MediaD.DirectoryExists("sdcard\\" + FolderPath));
 }