| 49 | } |
| 50 | |
| 51 | void TF_FileStat(const char* filename, TF_FileStatistics* stats, |
| 52 | TF_Status* status) { |
| 53 | ::tensorflow::FileStatistics cc_stats; |
| 54 | TF_SetStatus(status, TF_OK, ""); |
| 55 | ::tensorflow::Status s = |
| 56 | ::tensorflow::Env::Default()->Stat(filename, &cc_stats); |
| 57 | ::tensorflow::Set_TF_Status_from_Status(status, s); |
| 58 | if (s.ok()) { |
| 59 | stats->length = cc_stats.length; |
| 60 | stats->mtime_nsec = cc_stats.mtime_nsec; |
| 61 | stats->is_directory = cc_stats.is_directory; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | void TF_NewWritableFile(const char* filename, TF_WritableFileHandle** handle, |
| 66 | TF_Status* status) { |