public override bool DeleteFile(string FilePath) { try { if (MediaD.FileExists("sdcard\\" + FilePath)) { MediaD.DeleteFile("sdcard\\" + FilePath); } } catch (Exception e) { BVM.QuasarLogger.Error(e.Message); } return(false); }
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); }
public override bool CheckFileExists(string FilePath) { return(MediaD.FileExists("sdcard\\" + FilePath)); }