aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/platform/file_statistics.h
diff options
context:
space:
mode:
authorGravatar Rohan Jain <rohanj@google.com>2016-08-01 15:52:23 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-08-01 17:03:51 -0700
commitbc81b2c0cd7d70db6016a183591f05989f03f822 (patch)
tree981aae9eefe44f9e7c01b26d9aed98126426b205 /tensorflow/core/platform/file_statistics.h
parent41724a647f7644478d678285459e77bf46716b1c (diff)
Adding support for Stat in the FileIO API.
Change: 129043456
Diffstat (limited to 'tensorflow/core/platform/file_statistics.h')
-rw-r--r--tensorflow/core/platform/file_statistics.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/tensorflow/core/platform/file_statistics.h b/tensorflow/core/platform/file_statistics.h
new file mode 100644
index 0000000000..cc781e0a7f
--- /dev/null
+++ b/tensorflow/core/platform/file_statistics.h
@@ -0,0 +1,38 @@
+/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#ifndef THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_FILE_STATISTICS_H_
+#define THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_FILE_STATISTICS_H_
+
+#include "tensorflow/core/platform/types.h"
+
+namespace tensorflow {
+
+struct FileStatistics {
+ // The length of the file or -1 if finding file length is not supported.
+ int64 length = -1;
+ // The last modified time in nanoseconds.
+ int64 mtime_nsec = 0;
+ // This is the mode_t from stat.h containing file type and permission
+ // information.
+ mode_t mode = 0;
+
+ FileStatistics() {}
+ ~FileStatistics() {}
+};
+
+} // namespace tensorflow
+
+#endif // THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_FILE_STATISTICS_H_