-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Multi Thread Check & Add Section Setting
- Loading branch information
miticyber
committed
Sep 3, 2022
1 parent
02748c9
commit 7c80f8c
Showing
11 changed files
with
443 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ProxyFinderAndChecker | ||
namespace ProxyFinderAndChecker | ||
{ | ||
public class FileWorker | ||
{ | ||
static readonly object _ThreadLock = new object(); | ||
|
||
public static string[] ReadFile(string path) | ||
{ | ||
return File.ReadAllLines(path); | ||
} | ||
public static void WriteFile(string text, string path) | ||
{ | ||
if(!File.Exists(path)) File.Create(path); | ||
using (StreamWriter writer = new StreamWriter(path,true)) | ||
lock (_ThreadLock) | ||
{ | ||
writer.WriteLine(text); | ||
}; | ||
try | ||
{ | ||
if (!File.Exists(path)) File.Create(path).Close(); | ||
using (StreamWriter writer = new StreamWriter(path, true)) | ||
{ | ||
writer.WriteLine(text); | ||
}; | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.