public IHttpActionResult GetObList([FromUri] string path) { if (!Directory.Exists(path)) { return(BadRequest("Not exist path")); } var dir = new DirectoryInfo(path); var parentPath = dir.Parent?.FullName ?? ""; return(Ok(new Page(parentPath, path, _directoryRepository.GetObList(path)))); }