1 //===-- FileSystem.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_Host_FileSystem_h
11 #define liblldb_Host_FileSystem_h
13 #include "lldb/Utility/FileSpec.h"
14 #include "lldb/Utility/Status.h"
15 #include "llvm/Support/Chrono.h"
17 #include "lldb/lldb-types.h"
23 namespace lldb_private {
26 static const char *DEV_NULL;
27 static const char *PATH_CONVERSION_ERROR;
29 static Status Symlink(const FileSpec &src, const FileSpec &dst);
30 static Status Readlink(const FileSpec &src, FileSpec &dst);
32 static Status ResolveSymbolicLink(const FileSpec &src, FileSpec &dst);
34 /// Wraps ::fopen in a platform-independent way. Once opened, FILEs can be
35 /// manipulated and closed with the normal ::fread, ::fclose, etc. functions.
36 static FILE *Fopen(const char *path, const char *mode);
38 static llvm::sys::TimePoint<> GetModificationTime(const FileSpec &file_spec);