diff options
Diffstat (limited to 'tensorflow/core/platform/env.h')
-rw-r--r-- | tensorflow/core/platform/env.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/core/platform/env.h b/tensorflow/core/platform/env.h index 86b107759a5..67b45c69244 100644 --- a/tensorflow/core/platform/env.h +++ b/tensorflow/core/platform/env.h @@ -333,6 +333,15 @@ class Env { /// TF Status HasAtomicMove(const std::string& path, bool* has_atomic_move); + /// Returns whether the give path is on a file system + /// that has ability to create a new temp file. This can be used + /// to determine if there needs to be a temp location to safely write objects. + /// If this returns false, TensorFlow will write directly to output files + /// instead of creating a temporary file and swapping it in. This may mean + /// that incomplete writes are visible to consumers. + Status CanCreateTempFile(const std::string& fname, + bool* can_create_temp_file); + /// Stores the size of `fname` in `*file_size`. Status GetFileSize(const std::string& fname, uint64* file_size); |