Exemplo n.º 1
0
        public static async Task FromAsync(this DownloadSaveFile saveItem, string srcFullFileName)
        {
            var dfn = saveItem.GetFullFileName();
            var dir = Path.GetDirectoryName(dfn);

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }

            switch (saveItem.SaveType)
            {
            case "FilePlay":

                FilePlay(srcFullFileName, dfn);
                break;

            default:
                await CopyAsync(srcFullFileName, dfn);

                break;
            }
        }
Exemplo n.º 2
0
        public static string GetFullFileName(this DownloadSaveFile saveItem)
        {
            var fn = Path.Combine(saveItem.ProgramRoot, saveItem.FileName);

            return(Path.GetFullPath(fn));
        }