llvm/libc/src/__support/File/linux/file.cpp

//===--- Implementation of the Linux specialization of File ---------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "file.h"

#include "hdr/stdio_macros.h"
#include "hdr/types/off_t.h"
#include "src/__support/CPP/new.h"
#include "src/__support/File/file.h"
#include "src/__support/File/linux/lseekImpl.h"
#include "src/__support/OSUtil/fcntl.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h" // For error macros

#include <fcntl.h>       // For mode_t and other flags to the open syscall
#include <sys/stat.h>    // For S_IS*, S_IF*, and S_IR* flags.
#include <sys/syscall.h> // For syscall numbers

namespace LIBC_NAMESPACE_DECL {

FileIOResult linux_file_write(File *f, const void *data, size_t size) {}

FileIOResult linux_file_read(File *f, void *buf, size_t size) {}

ErrorOr<off_t> linux_file_seek(File *f, off_t offset, int whence) {}

int linux_file_close(File *f) {}

ErrorOr<File *> openfile(const char *path, const char *mode) {}

ErrorOr<LinuxFile *> create_file_from_fd(int fd, const char *mode) {}

int get_fileno(File *f) {}

} // namespace LIBC_NAMESPACE_DECL