Close the underlying file and delete it from the filesystem.
| 226 | |
| 227 | // Close the underlying file and delete it from the filesystem. |
| 228 | void DeleteFile() { |
| 229 | Close(); |
| 230 | if (readonly_.Load()) return; |
| 231 | DCHECK(!file_); |
| 232 | kudu::Status status = kudu::Env::Default()->DeleteFile(path_); |
| 233 | if (!status.ok()) { |
| 234 | LOG(WARNING) << Substitute("Failed to unlink $0: $1", path_, status.ToString()); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // Allocates a chunk of 'len' bytes in this file. The cache partition's lock |
| 239 | // 'partition_lock' must be held when calling this function. Returns the byte offset |
no test coverage detected