llvm/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp

//===- FuzzerIOPosix.cpp - IO utils for Posix. ----------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
// IO functions implementation using Posix API.
//===----------------------------------------------------------------------===//
#include "FuzzerPlatform.h"
#if LIBFUZZER_POSIX || LIBFUZZER_FUCHSIA

#include "FuzzerExtFunctions.h"
#include "FuzzerIO.h"
#include <cstdarg>
#include <cstdio>
#include <dirent.h>
#include <fstream>
#include <iterator>
#include <libgen.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

namespace fuzzer {

bool IsFile(const std::string &Path) {}

bool IsDirectory(const std::string &Path) {}

size_t FileSize(const std::string &Path) {}

std::string Basename(const std::string &Path) {}

void ListFilesInDirRecursive(const std::string &Dir, long *Epoch,
                             std::vector<std::string> *V, bool TopDir) {}

void IterateDirRecursive(const std::string &Dir,
                         void (*DirPreCallback)(const std::string &Dir),
                         void (*DirPostCallback)(const std::string &Dir),
                         void (*FileCallback)(const std::string &Dir)) {}

char GetSeparator() {}

bool IsSeparator(char C) {}

FILE* OpenFile(int Fd, const char* Mode) {}

int CloseFile(int fd) {}

int DuplicateFile(int Fd) {}

void RemoveFile(const std::string &Path) {}

void RenameFile(const std::string &OldPath, const std::string &NewPath) {}

intptr_t GetHandleFromFd(int fd) {}

std::string DirName(const std::string &FileName) {}

std::string TmpDir() {}

bool IsInterestingCoverageFile(const std::string &FileName) {}

void RawPrint(const char *Str) {}

void MkDir(const std::string &Path) {}

void RmDir(const std::string &Path) {}

const std::string &getDevNull() {}

}  // namespace fuzzer

#endif // LIBFUZZER_POSIX