public WebRetriever() { MiMFa_Path.CreateAllDirectories(TempDirectory); MiMFa_Path.DeleteAllFilesInAllDirectoriesInPath(TempDirectory); SetBrowser(fetch_browser); SetTimer(fetch_timer); }
public void Set( string name = "Default", string mrlCode = "", string css = "", string script = "", object extra = null) { Name = name; MRLCode = mrlCode; Css = css; Script = script; Extra = extra; MiMFa_Path.CreateAllDirectories(Address); }
public void Set( string name = "Default", ReportStyle style = null, string html = "", Object extra = null, Type type = null, params object[] objectArray) { Name = name; if (style != null) { Style.Set(style); } RSID = Style.RSID; ObjectArray = objectArray; Type = type; _HTML = html; Extra = extra; CreateDate = Default.Date; CreateTime = Default.Time; MiMFa_Path.CreateAllDirectories(Address); }
public override object execute(object obj, int index, int length) { FileMode f = (_create) ? FileMode.OpenOrCreate : FileMode.Open; if (index == 0) { source = obj; } else if (obj != null && obj is string) { if (source != null && source is string) { string s = PATH.getpath(source.ToString().Trim()); string d = PATH.getpath(obj.ToString().Trim()); bool sf = PATH.isfile(s); bool df = PATH.isfile(d); if (!df && !_nocreatedestinationdirectory) { MiMFa_Path.CreateAllDirectories(d); } if (!df && !sf) { MiMFa_Path.DirectoryCopy(s, d, _copysubdirectory);//copy directory to directory } else if (!df && sf) { File.Copy(s, d + Path.GetFileName(s)); } else if (df && !sf) { throw new ArgumentException("Can not copy a directory in file!"); } else { File.Copy(s, d); } } else if (source != null) { if (_serialize) { MiMFa_IOService.SaveSerializeFile(obj.ToString(), source, f); } else if (_append) { MiMFa_IOService.StringNewLineAppendFile(obj.ToString(), MCL.Display.Done(source), f); } else { MiMFa_IOService.StringToFile(obj.ToString(), MCL.Display.Done(source), f); } } else { throw new ArgumentNullException("Can not be null sources!"); } } else { obj = source; } return(Null); }