Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 510 for is_directory (0.29 sec)

  1. tensorflow/c/tf_file_statistics.h

    typedef struct TF_FileStatistics {
      // The length of the file in bytes.
      int64_t length;
      // The last modified time in nanoseconds.
      int64_t mtime_nsec;
      // Whether the name refers to a directory.
      bool is_directory;
    } TF_FileStatistics;
    
    // TODO(b/139060984): `tensorflow::FileStatistics` from
    // `core/platform/file_statistics.h` is a duplicate of this so maybe try to
    // remove duplication later?
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 27 20:21:15 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/modular_filesystem.cc

        stat->mtime_nsec = stats.mtime_nsec;
        stat->is_directory = stats.is_directory;
      }
    
      return StatusFromTF_Status(plugin_status.get());
    }
    
    Status ModularFileSystem::IsDirectory(const std::string& name,
                                          TransactionToken* token) {
      if (ops_->is_directory == nullptr)
        return FileSystem::IsDirectory(name, token);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 23.1K bytes
    - Viewed (0)
  3. tensorflow/c/env.cc

      ::tensorflow::Set_TF_Status_from_Status(status, s);
      if (s.ok()) {
        stats->length = cc_stats.length;
        stats->mtime_nsec = cc_stats.mtime_nsec;
        stats->is_directory = cc_stats.is_directory;
      }
    }
    
    void TF_NewWritableFile(const char* filename, TF_WritableFileHandle** handle,
                            TF_Status* status) {
      std::unique_ptr<::tensorflow::WritableFile> f;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 7K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

        TF_SetStatusFromGCSStatus(bucket_metadata.status(), status);
        if (TF_GetCode(status) == TF_OK) {
          stats->is_directory = true;
          stats->length = 0;
          stats->mtime_nsec = 0;
        }
        return;
      }
      if (IsDirectory(filesystem, path, status)) {
        stats->is_directory = true;
        stats->length = 0;
        stats->mtime_nsec = 0;
        return TF_SetStatus(status, TF_OK, "");
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 06:55:53 UTC 2023
    - 46.9K bytes
    - Viewed (0)
  5. tensorflow/c/env_test.cc

        ASSERT_EQ(childpath, nullptr);
        TF_StringStreamDone(children);
    
        TF_FileStatistics stats;
        TF_FileStat(filepath.c_str(), &stats, s);
        ASSERT_EQ(stats.length, strlen(data));
        ASSERT_FALSE(stats.is_directory);
        ASSERT_GT(stats.mtime_nsec, 0);
    
        // Trying to delete a non-empty directory should fail.
        TF_DeleteDir(dirpath.c_str(), s);
        ASSERT_NE(TF_OK, TF_GetCode(s))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Dec 10 20:52:48 UTC 2018
    - 4.2K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

      EXPECT_TF_OK(status_);
    
      TF_FileStatistics stat;
      tf_gcs_filesystem::Stat(filesystem_, dir.c_str(), &stat, status_);
      EXPECT_TF_OK(status_);
      EXPECT_TRUE(stat.is_directory);
    }
    
    TEST_F(GCSFilesystemTest, DeleteDir) {
      tf_gcs_filesystem::Init(filesystem_, status_);
      ASSERT_TF_OK(status_);
      const std::string dir = GetURIForPath("DeleteDir");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 31 12:04:23 UTC 2020
    - 24.9K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/filesystem_interface.h

      /// missing directory entry and all its descendants will be created by the
      /// plugin.
      ///
      /// DEFAULT IMPLEMENTATION: Creates directories one by one. Needs
      /// `path_exists`, `is_directory`, and `create_dir`.
      void (*recursively_create_dir)(const TF_Filesystem* filesystem,
                                     const char* path, TF_Status* status);
    
      /// Deletes the file specified by `path`.
      ///
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 27 17:36:54 UTC 2022
    - 53.1K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      if (stat(path, &sbuf) != 0) {
        TF_SetStatusFromIOError(status, errno, path);
      } else {
        stats->length = sbuf.st_size;
        stats->mtime_nsec = sbuf.st_mtime * (1000 * 1000 * 1000);
        stats->is_directory = S_ISDIR(sbuf.st_mode);
        TF_SetStatus(status, TF_OK, "");
      }
    }
    
    static int GetChildren(const TF_Filesystem* filesystem, const char* path,
                           char*** entries, TF_Status* status) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 24 20:08:23 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Files.java

              return ImmutableList.of();
            }
          };
    
      /**
       * Returns a predicate that returns the result of {@link File#isDirectory} on input files.
       *
       * @since 15.0
       */
      public static Predicate<File> isDirectory() {
        return FilePredicate.IS_DIRECTORY;
      }
    
      /**
       * Returns a predicate that returns the result of {@link File#isFile} on input files.
       *
       * @since 15.0
       */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  10. guava/src/com/google/common/io/Files.java

              return ImmutableList.of();
            }
          };
    
      /**
       * Returns a predicate that returns the result of {@link File#isDirectory} on input files.
       *
       * @since 15.0
       */
      public static Predicate<File> isDirectory() {
        return FilePredicate.IS_DIRECTORY;
      }
    
      /**
       * Returns a predicate that returns the result of {@link File#isFile} on input files.
       *
       * @since 15.0
       */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 33.1K bytes
    - Viewed (0)
Back to top