Finished ListPasswords method
This commit is contained in:
@@ -39,7 +39,26 @@ class Program
|
||||
|
||||
static int ListPasswords()
|
||||
{
|
||||
DirectoryInfo d;
|
||||
FileInfo[] files = new FileInfo[0];
|
||||
try
|
||||
{
|
||||
//since this file is already dependent on the Common namespace, we don't need events to mitigate this; better off asking ConfigFileManager for the path directly
|
||||
d = new DirectoryInfo(ConfigFileManager.GetPath());
|
||||
files = d.GetFiles("*.gpg");
|
||||
}
|
||||
catch (ArgumentNullException e)
|
||||
{
|
||||
ErrorOccured(e, "Error while getting password files");
|
||||
return 1;
|
||||
}
|
||||
|
||||
foreach (FileInfo f in files)
|
||||
{
|
||||
Console.WriteLine($"\t{f.Name}");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ErrorOccured(Exception e)
|
||||
|
||||
Reference in New Issue
Block a user