summaryrefslogtreecommitdiff
path: root/libc/src/__support/File/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/__support/File/file.cpp')
-rw-r--r--libc/src/__support/File/file.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/libc/src/__support/File/file.cpp b/libc/src/__support/File/file.cpp
index 1493633718e6..53fa06b10c8a 100644
--- a/libc/src/__support/File/file.cpp
+++ b/libc/src/__support/File/file.cpp
@@ -338,26 +338,6 @@ int File::flush_unlocked() {
return 0;
}
-int File::close() {
- {
- FileLock lock(this);
- if (prev_op == FileOp::WRITE && pos > 0) {
- auto buf_result = platform_write(this, buf, pos);
- if (buf_result.has_error() || buf_result.value < pos) {
- err = true;
- return buf_result.error;
- }
- }
- int result = platform_close(this);
- if (result != 0)
- return result;
- if (own_buf)
- free(buf);
- }
- free(this);
- return 0;
-}
-
int File::set_buffer(void *buffer, size_t size, int buffer_mode) {
// We do not need to lock the file as this method should be called before
// other operations are performed on the file.