OR-Tools
8.0
port/file.h
Go to the documentation of this file.
1
// Copyright 2010-2018 Google LLC
2
// Licensed under the Apache License, Version 2.0 (the "License");
3
// you may not use this file except in compliance with the License.
4
// You may obtain a copy of the License at
5
//
6
// http://www.apache.org/licenses/LICENSE-2.0
7
//
8
// Unless required by applicable law or agreed to in writing, software
9
// distributed under the License is distributed on an "AS IS" BASIS,
10
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
// See the License for the specific language governing permissions and
12
// limitations under the License.
13
14
#ifndef OR_TOOLS_PORT_FILE_H_
15
#define OR_TOOLS_PORT_FILE_H_
16
17
#include "absl/status/status.h"
18
#include "absl/strings/string_view.h"
19
20
namespace
operations_research
{
21
22
// See ortools/base/file.h
23
::absl::Status
PortableFileSetContents
(absl::string_view file_name,
24
absl::string_view content);
25
26
::absl::Status
PortableFileGetContents
(absl::string_view file_name,
27
std::string* output);
28
29
::absl::Status
PortableDeleteFile
(absl::string_view file_name);
30
31
// Returns true if successful. Outputs temp file to filename.
32
bool
PortableTemporaryFile
(
const
char
* directory_prefix,
33
std::string* filename_out);
34
35
}
// namespace operations_research
36
37
#endif // OR_TOOLS_PORT_FILE_H_
operations_research::PortableFileGetContents
::absl::Status PortableFileGetContents(absl::string_view file_name, std::string *output)
Definition:
file_nonport.cc:32
operations_research
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
Definition:
dense_doubly_linked_list.h:21
operations_research::PortableDeleteFile
::absl::Status PortableDeleteFile(absl::string_view file_name)
Definition:
file_nonport.cc:55
operations_research::PortableTemporaryFile
bool PortableTemporaryFile(const char *directory_prefix, std::string *filename_out)
Definition:
file_nonport.cc:37
operations_research::PortableFileSetContents
::absl::Status PortableFileSetContents(absl::string_view file_name, absl::string_view content)
Definition:
file_nonport.cc:27
ortools
port
file.h
Generated by
1.8.18