FileBrowseServer.cs 711 B

12345678910111213141516171819202122232425262728293031323334
  1. using Rac.Common;
  2. using System;
  3. using System.IO;
  4. using Rac.Tools;
  5. namespace Rac
  6. {
  7. public class FileBrowseServer : BaseService
  8. {
  9. private readonly string _dbFilePath;
  10. private DataAccess _db;
  11. public FileBrowseServer(string dbFilePath)
  12. {
  13. _dbFilePath = dbFilePath;
  14. }
  15. public override void Start()
  16. {
  17. if (false == File.Exists(_dbFilePath))
  18. {
  19. LogFatal($"Can not find database file:{_dbFilePath}");
  20. return;
  21. }
  22. _db = new DataAccess(_dbFilePath);
  23. var urls = _db.GetAllUrl();
  24. }
  25. public override void Stop()
  26. {
  27. }
  28. }
  29. }