WPILibC++ 2024.3.2
fs.h File Reference
#include <filesystem>
#include <fstream>
#include <string_view>
#include <system_error>

Go to the source code of this file.

Namespaces

namespace  fs
 

Typedefs

using fs::ifstream = std::ifstream
 
using fs::ofstream = std::ofstream
 
using fs::fstream = std::fstream
 
using fs::file_t = int
 

Enumerations

enum  fs::CreationDisposition : unsigned { fs::CD_CreateAlways = 0 , fs::CD_CreateNew = 1 , fs::CD_OpenExisting = 2 , fs::CD_OpenAlways = 3 }
 
enum  fs::FileAccess : unsigned { fs::FA_Read = 1 , fs::FA_Write = 2 }
 
enum  fs::OpenFlags : unsigned {
  fs::OF_None = 0 , fs::F_None = 0 , fs::OF_Text = 1 , fs::F_Text = 1 ,
  fs::OF_Append = 2 , fs::F_Append = 2 , fs::OF_Delete = 4 , fs::OF_ChildInherit = 8 ,
  fs::OF_UpdateAtime = 16
}
 

Functions

OpenFlags fs::operator| (OpenFlags A, OpenFlags B)
 
OpenFlags & fs::operator|= (OpenFlags &A, OpenFlags B)
 
FileAccess fs::operator| (FileAccess A, FileAccess B)
 
FileAccess & fs::operator|= (FileAccess &A, FileAccess B)
 
file_t fs::OpenFile (const path &Path, std::error_code &EC, CreationDisposition Disp, FileAccess Access, OpenFlags Flags, unsigned Mode=0666)
 Opens a file with the specified creation disposition, access mode, and flags and returns a platform-specific file object. More...
 
file_t fs::OpenFileForWrite (const path &Path, std::error_code &EC, CreationDisposition Disp, OpenFlags Flags, unsigned Mode=0666)
 Opens the file with the given name in a write-only or read-write mode, returning its open file descriptor. More...
 
file_t fs::OpenFileForReadWrite (const path &Path, std::error_code &EC, CreationDisposition Disp, OpenFlags Flags, unsigned Mode=0666)
 Opens the file with the given name in a write-only or read-write mode, returning its open file descriptor. More...
 
file_t fs::OpenFileForRead (const path &Path, std::error_code &EC, OpenFlags Flags=OF_None)
 Opens the file with the given name in a read-only mode, returning its open file descriptor. More...
 
int fs::FileToFd (file_t &F, std::error_code &EC, OpenFlags Flags)
 Converts a file object to a file descriptor. More...
 
void fs::CloseFile (file_t &F)
 Closes the file object. More...
 

Variables

const file_t fs::kInvalidFile