public static bool TempFileExists(string fPath) { if (!IsFileValid(fPath)) { return(false); } BaseFileIOStrategy loader = GetValidIOStrategy(fPath); if (loader == null) { return(false); } return(loader.TempExists(fPath)); }
public static MemoryStream Load(string fPath) { if (IsFileValid(fPath)) { return(null); } BaseFileIOStrategy loader = GetValidIOStrategy(fPath); if (loader == null) { return(null); } Helpers.D.Log("FileIO.Load: {0}", fPath); return(loader.Load(fPath)); }
public static void SaveDocument(ViewModels.DocumentViewModel document) { if (document == null) { return; } // Default file type is 'PDF' if none provided in docName (ext was omited) string ext = ""; if (string.IsNullOrEmpty(ParseExtension(document.DocName))) { ext = ".PDF"; } BaseFileIOStrategy strategy = GetValidIOStrategy(document.DocName + ext); if (strategy == null) { return; } strategy.SaveDocument(document); }