public void Delete_File()
        {
            string fileName = "testFile";
            bool   state    = _nodeService.DeleteFile(fileName);

            Assert.True(state);
            Assert.False(_nodeService.FileExist(fileName));
            Assert.True(_nodeService.TryGetBlockInfo(fileName, 0, out var info));
            Assert.True(_nodeService.TryGetBlockInfo(fileName, 1, out var info2));

            string filePath = $"{_nodeConfiguration.RootPath}\\{_nodeConfiguration.NodeName}\\{fileName}";

            Assert.False(Directory.Exists(filePath));
        }
 public IActionResult DeleteFile([FromQuery] string fileName)
 {
     if (ModelState.IsValid)
     {
         State state = _nodeService.DeleteFile(fileName);
         if (state)
         {
             return(Ok(state));
         }
         else
         {
             return(StatusCode(500, state));
         }
     }
     return(BadRequest(fileName));
 }