Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for somefile (0.2 sec)

  1. platforms/core-runtime/files/src/test/groovy/org/gradle/internal/file/impl/DefaultDeleterTest.groovy

            TestFile dir = tmpDir.getTestDirectory()
            dir.file("someFile").createFile()
    
            when:
            boolean didWork = deleter.deleteRecursively(dir)
    
            then:
            dir.assertDoesNotExist()
            didWork
        }
    
        def "deletes file"() {
            given:
            TestFile dir = tmpDir.getTestDirectory()
            TestFile file = dir.file("someFile")
            file.createFile()
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 09 12:40:48 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/verification/serializer/DependencyVerificationsXmlWriterTest.groovy

                addTrustedArtifact("group", "module", "1.0", null, true)
                addTrustedArtifact("group", "module", "1.1", "somefile.jar", false)
                addTrustedArtifact("group2", "module2", "1.2", "somefile.jar", true)
                addTrustedArtifact(null, "module2", null, "somefile.jar", true)
            }
            serialize()
    
            then:
            contents == """<?xml version="1.0" encoding="UTF-8"?>
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 01 13:40:00 UTC 2024
    - 16.8K bytes
    - Viewed (0)
  3. platforms/core-execution/file-watching/src/test/groovy/org/gradle/internal/watch/registry/impl/AbstractFileWatcherUpdaterTest.groovy

            def watchableHierarchy = file("watchable").createDir()
            def fileOutsideOfWatchableHierarchy = file("outside").file("someFile.txt").createFile()
            def fileInDirectoryIgnoredForWatching = file("cache/some-cache/someFile.txt").createFile()
            ignoredForWatching.add(fileInDirectoryIgnoredForWatching.absolutePath)
    
            when:
            registerWatchableHierarchies([watchableHierarchy])
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 25 15:08:33 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  4. platforms/native/platform-native/src/test/groovy/org/gradle/nativeplatform/plugins/NativeComponentModelPluginTest.groovy

                    exe(NativeExecutableSpec)
                }
            }
    
            then:
            getComponents()
        }
    
        static class RootFileRules extends RuleSource {
            @Model
            File someFile(@Path("buildDir") File buildDir) { return new File(buildDir, "something") }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 08 20:10:55 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Im Hintergrund erstellt das `open("./somefile.txt")` ein Objekt, das als „Kontextmanager“ bezeichnet wird.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:10:29 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Underneath, the `open("./somefile.txt")` creates an object that is called a "Context Manager".
    
    When the `with` block finishes, it makes sure to close the file, even if there were exceptions.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    例如,<a href="https://docs.python.org/zh-cn/3/tutorial/inputoutput.html#reading-and-writing-files" class="external-link" target="_blank">您可以使用`with`读取文件</a>:
    
    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    在底层,`open("./somefile.txt")`创建了一个被称为“上下文管理器”的对象。
    
    当`with`块结束时,它会确保关闭文件,即使发生了异常也是如此。
    
    当你使用`yield`创建一个依赖项时,**FastAPI**会在内部将其转换为上下文管理器,并与其他相关工具结合使用。
    
    ### 在依赖项中使用带有`yield`的上下文管理器
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Под капотом" open("./somefile.txt") создаёт объект называемый "контекстным менеджером".
    
    Когда блок `with` завершается, он обязательно закрывает файл, даже если были исключения.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 04:21:06 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    その後の`open("./somefile.txt")`は「コンテキストマネージャ」と呼ばれるオブジェクトを作成します。
    
    `with`ブロックが終了すると、例外があったとしてもファイルを確かに閉じます。
    
    `yield`を依存関係を作成すると、**FastAPI** は内部的にそれをコンテキストマネージャに変換し、他の関連ツールと組み合わせます。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  10. testing/internal-testing/src/main/groovy/org/gradle/test/fixtures/file/TestFile.java

        }
    
        /**
         * Creates a directory structure specified by the given closure.
         * <pre>
         * dir.create {
         *     subdir1 {
         *        file 'somefile.txt'
         *     }
         *     subdir2 { nested { file 'someFile' } }
         * }
         * </pre>
         */
        public TestFile create(@DelegatesTo(value = TestWorkspaceBuilder.class, strategy = Closure.DELEGATE_FIRST) Closure structure) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 18:31:52 UTC 2024
    - 30.3K bytes
    - Viewed (0)
Back to top