Write package name and version into text file
This commit is contained in:
parent
e609caf892
commit
07982425e0
@ -66,14 +66,18 @@ public class PacserverUtils {
|
||||
if (!File.Exists(filePath)) {
|
||||
using (File.Open(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)) {
|
||||
using (StreamWriter sw = new StreamWriter(filePath)) {
|
||||
sw.WriteLine("");
|
||||
foreach (string package in packageNamesAndVersion) {
|
||||
sw.WriteLine(package);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (File.Exists(filePath)) {
|
||||
File.Delete(filePath);
|
||||
using (File.Open(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite)) {
|
||||
using (var sw = new StreamWriter(filePath)) {
|
||||
sw.WriteLine("");
|
||||
foreach (string package in packageNamesAndVersion) {
|
||||
sw.WriteLine(package);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user