public bool LoadLinksFromFile(string vsPath) { cFile oLogger = new cFile("LoadLinksFromFile.Log"); try { // oLogger.Write("++++++++++++++++++++++++++"); // oLogger.Write(vsPath); // oLogger.Write("++++++++++++++++++++++++++"); cFile oFile = new cFile(vsPath); //oFile.FileName = ; List <String> sNewUrlList = oFile.ReadList(); Parallel.For(0, sNewUrlList.Count, x => { string sUrl1 = sNewUrlList[x]; // oLogger.Write(sUrl1); // oLogger.Write("-----" + iCnt1.ToString() + "-----"); msUrlList.Add(sUrl1);; }); return(true); } catch (Exception ex) { oLogger.WriteLog(ex.Message, "LoadLinksFromFileError.log"); throw ex; } //throw new NotImplementedException(); }
public bool SortLinks(string vsPath) { try { cFile oFile = new cFile(vsPath); string sFFdef1 = "http://m.fanfiction.net/s/"; string sFFdef2 = "https://m.fanfiction.net/s/"; //oFile.FileName = ; List <String> sUrlList = oFile.ReadList(); for (int iCnt = 0; iCnt < sUrlList.Count(); iCnt++) { // if (sUrlList[iCnt].Substring(0, 26) == "http://m.fanfiction.net/s/") // { if ((sUrlList[iCnt].Substring(0, 26) == sFFdef1) || (sUrlList[iCnt].Substring(0, 27) == sFFdef2)) { // } } return(true); } } catch (Exception ex) { throw ex; } return(false); }
public bool LoadLinksFromFile(string vsPath) { try { cFile oLogger = new cFile("Error.txt"); oLogger.Write("++++++++++++++++++++++++++"); oLogger.Write(vsPath); oLogger.Write("++++++++++++++++++++++++++"); cFile oFile = new cFile(vsPath); //oFile.FileName = ; List <String> sNewUrlList = oFile.ReadList(); for (int iCnt1 = 0; iCnt1 < sNewUrlList.Count(); iCnt1++) { oLogger.Write("-----" + iCnt1.ToString() + "-----"); string sUrl1 = sNewUrlList[iCnt1]; oLogger.Write(sUrl1); oLogger.Write("-----" + iCnt1.ToString() + "-----"); if (sUrl1.Length >= 28) { sUrl1 = FixFFdotNet(sUrl1); } if (sUrl1.Length >= 5) { msUrlList.Add(sUrl1);; } } return(true); } catch (Exception ex) { throw ex; } //throw new NotImplementedException(); }
public List <String> GetLinksFromFile(string vsPath) { cFile oFile = new cFile(vsPath); //oFile.FileName = ; List <String> sUrlList = oFile.ReadList(); return(sUrlList); //throw new NotImplementedException(); }
public bool GetLinkFilesFromFile(string spath) { try { cFile oFile = new cFile(spath); oFilesList = oFile.ReadList(); return(true); } catch (Exception) { return(false); } return(false); }
public bool ReadLinksFromTextFiles() { foreach (var sFile in oFilesList) { try { cFile oFile = new cFile(sFile); oUrListList.AddRange(oFile.ReadList()); } catch (Exception) { return(false); } } return(true); }
public bool SortLinks(string vsPath) { try { cFile oFile = new cFile(vsPath); //oFile.FileName = ; List <String> sUrlList = oFile.ReadList(); for (int iCnt = 0; iCnt < sUrlList.Count(); iCnt++) { if (sUrlList[iCnt].Substring(0, 26) == "http://m.fanfiction.net/s/") { } } return(true); } catch { throw; //ex; } }
public bool SortFFdotNet(string vsPath) { try { cFile oFile = new cFile(vsPath); //oFile.FileName = ; List <String> sUrlList = oFile.ReadList(); for (int iCnt = 0; iCnt < sUrlList.Count(); iCnt++) { if (sUrlList[iCnt].Substring(0, 26) == "http://m.fanfiction.net/s/") { } } return(true); } catch (Exception ex) { throw ex; } throw new System.NotImplementedException(); }
public bool LoadToFile(string vsPath) { cFile oFile = new cFile(vsPath); try { List <String> sNewUrlList = oFile.ReadList(); Parallel.For(0, sNewUrlList.Count, x => { string sUrl1 = sNewUrlList[x]; oFile.SaveLink(sUrl1, msExportedLinkPath); }); oFile.Delete(); return(true); } catch (Exception ex) { throw ex; } //throw new NotImplementedException(); }