Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
file Namespace Reference

Namespaces

namespace  internal

Typedefs

using Options = int

Functions

absl::Status Open (absl::string_view file_name, absl::string_view mode, File **f, Options options)
FileOpenOrDie (absl::string_view file_name, absl::string_view mode, Options options)
absl::StatusOr< std::string > GetContents (absl::string_view path, Options options)
absl::Status GetContents (absl::string_view file_name, std::string *output, Options options)
absl::Status WriteString (File *file, absl::string_view contents, Options options)
absl::Status SetContents (absl::string_view file_name, absl::string_view contents, Options options)
absl::Status GetTextProto (absl::string_view file_name, google::protobuf::Message *proto, Options options)
absl::Status SetTextProto (absl::string_view file_name, const google::protobuf::Message &proto, Options options)
absl::Status GetBinaryProto (const absl::string_view file_name, google::protobuf::Message *proto, Options options)
absl::Status SetBinaryProto (absl::string_view file_name, const google::protobuf::Message &proto, Options options)
absl::Status Delete (absl::string_view path, Options options)
absl::Status Exists (absl::string_view path, Options options)
Options Defaults ()
template<typename T>
absl::StatusOr< T > GetTextProto (absl::string_view file_name, Options options)
template<typename T>
absl::StatusOr< T > GetBinaryProto (absl::string_view file_name, Options options)
absl::Status Match (std::string_view pattern, std::vector< std::string > *result, const file::Options &options)
absl::Status IsDirectory (std::string_view path, const file::Options &options)
absl::Status RecursivelyCreateDir (std::string_view path, const file::Options &options)
std::string JoinPath (absl::string_view path1, absl::string_view path2)
bool IsAbsolutePath (absl::string_view path)
std::string AddSlash (absl::string_view path)
absl::string_view Dirname (absl::string_view path)
absl::string_view Basename (absl::string_view path)
std::pair< absl::string_view, absl::string_view > SplitPath (absl::string_view path)
absl::string_view Stem (absl::string_view path)
absl::string_view Extension (absl::string_view path)
std::string CleanPath (const absl::string_view unclean_path)
std::string CollapseSlashes (absl::string_view path)
std::string JoinPath ()
std::string JoinPath (absl::string_view path)
template<typename... T>
std::string JoinPath (absl::string_view path1, absl::string_view path2, absl::string_view path3, const T &... args)
template<typename... T>
std::string JoinPathRespectAbsolute (const T &... args)
::absl::StatusOr< std::string > MakeTempFilename (absl::string_view directory, absl::string_view file_prefix)
std::string TempFile (absl::string_view prefix)

Typedef Documentation

◆ Options

using file::Options = int

Definition at line 84 of file file.h.

Function Documentation

◆ AddSlash()

std::string file::AddSlash ( absl::string_view path)

Definition at line 96 of file path.cc.

◆ Basename()

absl::string_view file::Basename ( absl::string_view path)

Definition at line 109 of file path.cc.

◆ CleanPath()

std::string file::CleanPath ( const absl::string_view unclean_path)

Definition at line 137 of file path.cc.

◆ CollapseSlashes()

std::string file::CollapseSlashes ( absl::string_view path)

Definition at line 218 of file path.cc.

◆ Defaults()

Options file::Defaults ( )
inline

Definition at line 86 of file file.h.

◆ Delete()

absl::Status file::Delete ( absl::string_view path,
Options options )

Definition at line 491 of file file.cc.

◆ Dirname()

absl::string_view file::Dirname ( absl::string_view path)

Definition at line 105 of file path.cc.

◆ Exists()

absl::Status file::Exists ( absl::string_view path,
Options options )

Definition at line 500 of file file.cc.

◆ Extension()

absl::string_view file::Extension ( absl::string_view path)

Definition at line 133 of file path.cc.

◆ GetBinaryProto() [1/2]

template<typename T>
absl::StatusOr< T > file::GetBinaryProto ( absl::string_view file_name,
Options options )

Definition at line 137 of file file.h.

◆ GetBinaryProto() [2/2]

absl::Status file::GetBinaryProto ( const absl::string_view file_name,
google::protobuf::Message * proto,
Options options )

Definition at line 463 of file file.cc.

◆ GetContents() [1/2]

absl::Status file::GetContents ( absl::string_view file_name,
std::string * output,
Options options )

Definition at line 359 of file file.cc.

◆ GetContents() [2/2]

absl::StatusOr< std::string > file::GetContents ( absl::string_view path,
Options options )

Definition at line 349 of file file.cc.

◆ GetTextProto() [1/2]

absl::Status file::GetTextProto ( absl::string_view file_name,
google::protobuf::Message * proto,
Options options )

Definition at line 409 of file file.cc.

◆ GetTextProto() [2/2]

template<typename T>
absl::StatusOr< T > file::GetTextProto ( absl::string_view file_name,
Options options )

Definition at line 123 of file file.h.

◆ IsAbsolutePath()

bool file::IsAbsolutePath ( absl::string_view path)

Definition at line 92 of file path.cc.

◆ IsDirectory()

absl::Status file::IsDirectory ( std::string_view path,
const file::Options & options )

Definition at line 71 of file filesystem.cc.

◆ JoinPath() [1/4]

std::string file::JoinPath ( )
inline

Definition at line 82 of file path.h.

◆ JoinPath() [2/4]

std::string file::JoinPath ( absl::string_view path)
inline

Definition at line 83 of file path.h.

◆ JoinPath() [3/4]

std::string file::JoinPath ( absl::string_view path1,
absl::string_view path2 )

Definition at line 25 of file path.cc.

◆ JoinPath() [4/4]

template<typename... T>
std::string file::JoinPath ( absl::string_view path1,
absl::string_view path2,
absl::string_view path3,
const T &... args )
inline

Definition at line 88 of file path.h.

◆ JoinPathRespectAbsolute()

template<typename... T>
std::string file::JoinPathRespectAbsolute ( const T &... args)
inline

Definition at line 104 of file path.h.

◆ MakeTempFilename()

absl::StatusOr< std::string > file::MakeTempFilename ( absl::string_view directory,
absl::string_view file_prefix )

Definition at line 33 of file temp_file.cc.

◆ Match()

absl::Status file::Match ( std::string_view pattern,
std::vector< std::string > * result,
const file::Options & options )

Definition at line 40 of file filesystem.cc.

◆ Open()

absl::Status file::Open ( absl::string_view file_name,
absl::string_view mode,
File ** f,
Options options )

Definition at line 328 of file file.cc.

◆ OpenOrDie()

File * file::OpenOrDie ( absl::string_view file_name,
absl::string_view mode,
Options options )

Definition at line 340 of file file.cc.

◆ RecursivelyCreateDir()

absl::Status file::RecursivelyCreateDir ( std::string_view path,
const file::Options & options )

Definition at line 81 of file filesystem.cc.

◆ SetBinaryProto()

absl::Status file::SetBinaryProto ( absl::string_view file_name,
const google::protobuf::Message & proto,
Options options )

Definition at line 476 of file file.cc.

◆ SetContents()

absl::Status file::SetContents ( absl::string_view file_name,
absl::string_view contents,
Options options )

Definition at line 389 of file file.cc.

◆ SetTextProto()

absl::Status file::SetTextProto ( absl::string_view file_name,
const google::protobuf::Message & proto,
Options options )

Definition at line 448 of file file.cc.

◆ SplitPath()

std::pair< absl::string_view, absl::string_view > file::SplitPath ( absl::string_view path)

Definition at line 113 of file path.cc.

◆ Stem()

absl::string_view file::Stem ( absl::string_view path)

Definition at line 129 of file path.cc.

◆ TempFile()

std::string file::TempFile ( absl::string_view prefix)

Definition at line 25 of file temp_path.cc.

◆ WriteString()

absl::Status file::WriteString ( File * file,
absl::string_view contents,
Options options )

Definition at line 378 of file file.cc.