File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1215,6 +1215,8 @@ cc_library(
12151215 name = "null_file_system" ,
12161216 hdrs = ["null_file_system.h" ],
12171217 deps = [
1218+ "@com_google_absl//absl/status" ,
1219+ "@com_google_absl//absl/strings:string_view" ,
12181220 "@xla//xla/tsl/platform:env" ,
12191221 ],
12201222)
@@ -1441,6 +1443,7 @@ cc_library(
14411443 deps = [
14421444 ":random" ,
14431445 ":retrying_utils" ,
1446+ "@com_google_absl//absl/strings:string_view" ,
14441447 "@xla//xla/tsl/platform:env" ,
14451448 "@xla//xla/tsl/platform:errors" ,
14461449 "@xla//xla/tsl/platform:status" ,
@@ -1456,7 +1459,6 @@ tsl_cc_test(
14561459 ":str_util" ,
14571460 "@com_google_googletest//:gtest_main" ,
14581461 "@xla//xla/tsl/lib/core:status_test_util" ,
1459- "@xla//xla/tsl/platform:env_impl" ,
14601462 "@xla//xla/tsl/platform:test" ,
14611463 ],
14621464)
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ limitations under the License.
2020#include < string>
2121#include < vector>
2222
23+ #include " absl/status/status.h"
24+ #include " absl/strings/string_view.h"
2325#include " xla/tsl/platform/env.h"
2426#include " xla/tsl/platform/file_system.h"
2527#include " xla/tsl/platform/file_system_helper.h"
@@ -62,7 +64,7 @@ class NullFileSystem : public FileSystem {
6264 " NewReadOnlyMemoryRegionFromFile unimplemented" );
6365 }
6466
65- absl::Status FileExists (const string& fname,
67+ absl::Status FileExists (absl::string_view fname,
6668 TransactionToken* token) override {
6769 return errors::Unimplemented (" FileExists unimplemented" );
6870 }
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ limitations under the License.
1818
1919#include < functional>
2020#include < memory>
21- #include < string>
2221#include < vector>
2322
23+ #include " absl/strings/string_view.h"
2424#include " xla/tsl/platform/env.h"
2525#include " xla/tsl/platform/errors.h"
2626#include " xla/tsl/platform/file_system.h"
@@ -56,7 +56,7 @@ class RetryingFileSystem : public FileSystem {
5656 const string& filename, TransactionToken* token,
5757 std::unique_ptr<ReadOnlyMemoryRegion>* result) override ;
5858
59- absl::Status FileExists (const string& fname,
59+ absl::Status FileExists (absl::string_view fname,
6060 TransactionToken* token) override {
6161 return RetryingUtils::CallWithRetries (
6262 [this , &fname, token]() {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class MockFileSystem : public FileSystem {
127127 return calls_.ConsumeNextCall (" NewReadOnlyMemoryRegionFromFile" );
128128 }
129129
130- absl::Status FileExists (const string& fname,
130+ absl::Status FileExists (absl::string_view fname,
131131 TransactionToken* token) override {
132132 return calls_.ConsumeNextCall (" FileExists" );
133133 }
You can’t perform that action at this time.
0 commit comments