-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a command to test reading a file system from a file.db
- Loading branch information
Lysann Schlegel
committed
Dec 2, 2018
1 parent
54b0121
commit adf7c14
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
Submodule AnnoRDA
updated
from ead42c to 0d2cec
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.IO; | ||
|
||
using AnnoRDA.FileDB.Reader; | ||
using AnnoRDA.FileDB.Structs; | ||
|
||
namespace RDAExplorer.FileDBTool.Commands | ||
{ | ||
class LoadFileDBCommand : ManyConsole.ConsoleCommand | ||
{ | ||
public LoadFileDBCommand() | ||
{ | ||
IsCommand("load", "Load file.db"); | ||
HasLongDescription("Load contents of a file.db."); | ||
|
||
HasAdditionalArguments(1, " file.db"); | ||
} | ||
|
||
public override int Run(string[] remainingArguments) | ||
{ | ||
using (var fileStream = new FileStream(remainingArguments[0], FileMode.Open, FileAccess.Read)) { | ||
using (var reader = new FileSystemReader(fileStream)) { | ||
reader.ReadFileSystem(); | ||
} | ||
} | ||
return 0; | ||
} | ||
} | ||
} |