Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
file.cc File Reference
#include "ortools/base/file.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <cstdint>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
#include <string>
#include "absl/log/check.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/io/tokenizer.h"
#include "google/protobuf/message.h"
#include "google/protobuf/text_format.h"
#include "ortools/base/logging.h"

Go to the source code of this file.

Namespaces

namespace  file
 

Functions

absl::Status file::Open (absl::string_view filename, absl::string_view mode, File **f, Options options)
 As of 2016-01, these methods can only be used with flags = file::Defaults().
 
Filefile::OpenOrDie (absl::string_view filename, absl::string_view mode, Options options)
 
absl::StatusOr< std::string > file::GetContents (absl::string_view path, Options options)
 
absl::Status file::GetContents (absl::string_view filename, std::string *output, Options options)
 
absl::Status file::WriteString (File *file, absl::string_view contents, Options options)
 
absl::Status file::SetContents (absl::string_view filename, absl::string_view contents, Options options)
 
bool file::ReadFileToString (absl::string_view file_name, std::string *output)
 
bool file::WriteStringToFile (absl::string_view data, absl::string_view file_name)
 
bool file::ReadFileToProto (absl::string_view file_name, google::protobuf::Message *proto)
 
void file::ReadFileToProtoOrDie (absl::string_view file_name, google::protobuf::Message *proto)
 
bool file::WriteProtoToASCIIFile (const google::protobuf::Message &proto, absl::string_view file_name)
 
void file::WriteProtoToASCIIFileOrDie (const google::protobuf::Message &proto, absl::string_view file_name)
 
bool file::WriteProtoToFile (const google::protobuf::Message &proto, absl::string_view file_name)
 
void file::WriteProtoToFileOrDie (const google::protobuf::Message &proto, absl::string_view file_name)
 
absl::Status file::GetTextProto (absl::string_view filename, google::protobuf::Message *proto, Options options)
 
absl::Status file::SetTextProto (absl::string_view filename, const google::protobuf::Message &proto, Options options)
 
absl::Status file::GetBinaryProto (const absl::string_view filename, google::protobuf::Message *proto, Options options)
 
absl::Status file::SetBinaryProto (absl::string_view filename, const google::protobuf::Message &proto, Options options)
 
absl::Status file::Delete (absl::string_view path, Options options)
 
absl::Status file::Exists (absl::string_view path, Options options)