OR-Tools  8.1
file Namespace Reference

Functions

absl::Status Open (const absl::string_view &filename, const absl::string_view &mode, File **f, int flags)
 
FileOpenOrDie (const absl::string_view &filename, const absl::string_view &mode, int flags)
 
absl::Status GetContents (const absl::string_view &filename, std::string *output, int flags)
 
absl::Status WriteString (File *file, const absl::string_view &contents, int flags)
 
absl::Status SetContents (const absl::string_view &filename, const absl::string_view &contents, int flags)
 
bool ReadFileToString (const absl::string_view &file_name, std::string *output)
 
bool WriteStringToFile (const std::string &data, const absl::string_view &file_name)
 
bool ReadFileToProto (const absl::string_view &file_name, google::protobuf::Message *proto)
 
void ReadFileToProtoOrDie (const absl::string_view &file_name, google::protobuf::Message *proto)
 
bool WriteProtoToASCIIFile (const google::protobuf::Message &proto, const absl::string_view &file_name)
 
void WriteProtoToASCIIFileOrDie (const google::protobuf::Message &proto, const absl::string_view &file_name)
 
bool WriteProtoToFile (const google::protobuf::Message &proto, const absl::string_view &file_name)
 
void WriteProtoToFileOrDie (const google::protobuf::Message &proto, const absl::string_view &file_name)
 
absl::Status GetTextProto (const absl::string_view &filename, google::protobuf::Message *proto, int flags)
 
absl::Status SetTextProto (const absl::string_view &filename, const google::protobuf::Message &proto, int flags)
 
absl::Status SetBinaryProto (const absl::string_view &filename, const google::protobuf::Message &proto, int flags)
 
absl::Status Delete (const absl::string_view &path, int flags)
 
absl::Status Exists (const absl::string_view &path, int flags)
 
int Defaults ()
 

Function Documentation

◆ Defaults()

int file::Defaults ( )
inline

Definition at line 119 of file base/file.h.

◆ Delete()

absl::Status Delete ( const absl::string_view &  path,
int  flags 
)

Definition at line 297 of file file.cc.

◆ Exists()

absl::Status Exists ( const absl::string_view &  path,
int  flags 
)

Definition at line 305 of file file.cc.

◆ GetContents()

absl::Status GetContents ( const absl::string_view &  filename,
std::string *  output,
int  flags 
)

Definition at line 163 of file file.cc.

◆ GetTextProto()

absl::Status GetTextProto ( const absl::string_view &  filename,
google::protobuf::Message *  proto,
int  flags 
)

Definition at line 267 of file file.cc.

◆ Open()

absl::Status Open ( const absl::string_view &  filename,
const absl::string_view &  mode,
File **  f,
int  flags 
)

Definition at line 142 of file file.cc.

◆ OpenOrDie()

File * OpenOrDie ( const absl::string_view &  filename,
const absl::string_view &  mode,
int  flags 
)

Definition at line 154 of file file.cc.

◆ ReadFileToProto()

bool ReadFileToProto ( const absl::string_view &  file_name,
google::protobuf::Message *  proto 
)

Definition at line 209 of file file.cc.

◆ ReadFileToProtoOrDie()

void ReadFileToProtoOrDie ( const absl::string_view &  file_name,
google::protobuf::Message *  proto 
)

Definition at line 238 of file file.cc.

◆ ReadFileToString()

bool ReadFileToString ( const absl::string_view &  file_name,
std::string *  output 
)

Definition at line 193 of file file.cc.

◆ SetBinaryProto()

absl::Status SetBinaryProto ( const absl::string_view &  filename,
const google::protobuf::Message &  proto,
int  flags 
)

Definition at line 287 of file file.cc.

◆ SetContents()

absl::Status SetContents ( const absl::string_view &  filename,
const absl::string_view &  contents,
int  flags 
)

Definition at line 188 of file file.cc.

◆ SetTextProto()

absl::Status SetTextProto ( const absl::string_view &  filename,
const google::protobuf::Message &  proto,
int  flags 
)

Definition at line 277 of file file.cc.

◆ WriteProtoToASCIIFile()

bool WriteProtoToASCIIFile ( const google::protobuf::Message &  proto,
const absl::string_view &  file_name 
)

Definition at line 243 of file file.cc.

◆ WriteProtoToASCIIFileOrDie()

void WriteProtoToASCIIFileOrDie ( const google::protobuf::Message &  proto,
const absl::string_view &  file_name 
)

Definition at line 250 of file file.cc.

◆ WriteProtoToFile()

bool WriteProtoToFile ( const google::protobuf::Message &  proto,
const absl::string_view &  file_name 
)

Definition at line 255 of file file.cc.

◆ WriteProtoToFileOrDie()

void WriteProtoToFileOrDie ( const google::protobuf::Message &  proto,
const absl::string_view &  file_name 
)

Definition at line 262 of file file.cc.

◆ WriteString()

absl::Status WriteString ( File file,
const absl::string_view &  contents,
int  flags 
)

Definition at line 176 of file file.cc.

◆ WriteStringToFile()

bool WriteStringToFile ( const std::string &  data,
const absl::string_view &  file_name 
)

Definition at line 197 of file file.cc.