| 58 | constexpr const size_t kWritableFileBufferSize = 65536; |
| 59 | |
| 60 | Status PosixError(const std::string& context, int error_number) { |
| 61 | if (error_number == ENOENT) { |
| 62 | return Status::NotFound(context, std::strerror(error_number)); |
| 63 | } else { |
| 64 | return Status::IOError(context, std::strerror(error_number)); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | // Helper class to limit resource usage to avoid exhaustion. |
| 69 | // Currently used to limit read-only file descriptors and mmap file usage |
no test coverage detected