]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Host/FileSystem.h
Add libbearssl
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Host / FileSystem.h
1 //===-- FileSystem.h --------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_Host_FileSystem_h
11 #define liblldb_Host_FileSystem_h
12
13 #include "lldb/Utility/FileSpec.h"
14 #include "lldb/Utility/Status.h"
15 #include "llvm/Support/Chrono.h"
16
17 #include "lldb/lldb-types.h"
18
19 #include <stdint.h>
20 #include <stdio.h>
21 #include <sys/stat.h>
22
23 namespace lldb_private {
24 class FileSystem {
25 public:
26   static const char *DEV_NULL;
27   static const char *PATH_CONVERSION_ERROR;
28
29   static Status Symlink(const FileSpec &src, const FileSpec &dst);
30   static Status Readlink(const FileSpec &src, FileSpec &dst);
31
32   static Status ResolveSymbolicLink(const FileSpec &src, FileSpec &dst);
33
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);
37
38   static llvm::sys::TimePoint<> GetModificationTime(const FileSpec &file_spec);
39 };
40 }
41
42 #endif