- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TransferFileContents (0.25 sec)
-
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.h
// Copies up to `size` of `src` to `dst`, creating destination if needed. // // Callers should pass size of `src` in `size` and the permissions of `src` in // `mode`. The later is only used if `dst` needs to be created. int TransferFileContents(const char* src, const char* dst, mode_t mode, off_t size); // Returns true only if `entry` points to an entry other than `.` or `..`. // // This is a filter for `scandir`.
C - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Fri Nov 22 21:23:55 GMT 2019 - 1.5K bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc
#include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "tensorflow/c/experimental/filesystem/plugins/posix/copy_file.h" namespace tf_posix_filesystem { int TransferFileContents(const char* src, const char* dst, mode_t mode, off_t size) { int src_fd = open(src, O_RDONLY); if (src_fd < 0) return -1; // When creating file, use the same permissions as original
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jan 16 05:36:52 GMT 2020 - 2.1K bytes - Viewed (1) -
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc
} else if (S_ISDIR(st.st_mode)) { TF_SetStatus(status, TF_FAILED_PRECONDITION, "source path is a directory"); return; } // Both `src` and `dst` point to files here. Delegate to helper. if (TransferFileContents(src, dst, st.st_mode, st.st_size) < 0) TF_SetStatusFromIOError(status, errno, dst); else TF_SetStatus(status, TF_OK, ""); } static void PathExists(const TF_Filesystem* filesystem, const char* path,
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Sun Mar 24 20:08:23 GMT 2024 - 15.8K bytes - Viewed (0)