- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for getUnixMode (0.35 sec)
-
platforms/core-runtime/native/src/test/groovy/org/gradle/internal/nativeintegration/filesystem/services/UnsupportedFilePermissionsTest.groovy
def permissions = new UnsupportedFilePermissions() def "warns on first attempt to stat a file"() { when: permissions.getUnixMode(tmpDir.createFile("file")) permissions.getUnixMode(tmpDir.createDir("dir")) then: outputEventListener.toString() == WARN_MESSAGE } def "warns on first attempt to chmod a file"() { when:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:06:40 UTC 2023 - 2.3K bytes - Viewed (0) -
platforms/core-runtime/native/src/test/groovy/org/gradle/internal/nativeintegration/filesystem/CommonFileSystemTest.groovy
when: fs.chmod(d, mode) then: fs.getUnixMode(d) == mode d.mode == mode where: mode << [0755, 0700, 0722] } @Requires(UnitTestPreconditions.NoFilePermissions) def "unix permissions have default values on unsupported platforms"() { expect: fs.getUnixMode(tmpDir.createFile("someFile")) == FileSystem.DEFAULT_FILE_MODE
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:06:40 UTC 2023 - 5.8K bytes - Viewed (0) -
platforms/core-runtime/native/src/main/java/org/gradle/internal/nativeintegration/filesystem/services/UnsupportedFilePermissions.java
private final FallbackStat stat = new FallbackStat(); private final EmptyChmod chmod = new EmptyChmod(); @Override public int getUnixMode(File f) throws IOException { maybeWarn(); return stat.getUnixMode(f); } @Override public void chmod(File file, int mode) throws Exception { maybeWarn(); chmod.chmod(file, mode); }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 16 15:50:56 UTC 2024 - 1.8K bytes - Viewed (0) -
platforms/core-runtime/files/src/main/java/org/gradle/internal/file/StatStatistics.java
public interface StatStatistics { /** * Number of times {@link Stat#stat(File)} was called. */ long getStatCount(); /** * Number of times {@link Stat#getUnixMode(File)} was called. */ long getUnixModeCount(); class Collector { private final AtomicLong statCount = new AtomicLong(); private final AtomicLong unixModeCount = new AtomicLong();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:55:52 UTC 2023 - 2.1K bytes - Viewed (0) -
testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/daemon/DaemonRegistryStateProbe.groovy
if (OperatingSystem.current().isLinux() || OperatingSystem.current().isMacOsX()) { def stat = NativeServicesTestFixture.instance.get(Stat) assert stat.getUnixMode(registryFile) == 0600 // user read-write assert stat.getUnixMode(registryFile.parentFile) == 0700 // user read-write-execute } } @Override State getCurrentState() {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 07:21:38 UTC 2024 - 2.4K bytes - Viewed (0) -
platforms/core-runtime/native/src/test/groovy/org/gradle/internal/nativeintegration/filesystem/services/GenericFileSystemTest.groovy
def "wraps failure to get file mode"() { def failure = new RuntimeException() def file = new File("does-not-exist") given: fileModeAccessor.getUnixMode(_) >> { throw failure } when: fileSystem.getUnixMode(file) then: FileException e = thrown() e.message == "Could not get file mode for '$file'." } def "wraps failure to get create symlink"() {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 16 15:50:56 UTC 2024 - 3K bytes - Viewed (0) -
platforms/core-runtime/files/src/main/java/org/gradle/internal/file/Stat.java
* See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.internal.file; import java.io.File; public interface Stat { int getUnixMode(File f) throws FileException; FileMetadata stat(File f) throws FileException;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:55:52 UTC 2023 - 803 bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/caching/internal/BuildCacheServices.java
public FilePermissionsAccessAdapter(FileSystem fileSystem) { this.fileSystem = fileSystem; } @Override public int getUnixMode(File f) throws FileException { return fileSystem.getUnixMode(f); } @Override public void chmod(File file, int mode) throws FileException { fileSystem.chmod(file, mode); } }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon May 27 12:34:44 UTC 2024 - 8.7K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/test/groovy/org/gradle/internal/vfs/impl/AbstractFileSystemAccessTest.groovy
private boolean statAllowed AllowingStat(Stat delegate) { this.delegate = delegate } @Override int getUnixMode(File f) throws FileException { checkIfAllowed() return delegate.getUnixMode(f) } @Override FileMetadata stat(File f) throws FileException { checkIfAllowed() return delegate.stat(f)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 16 15:50:55 UTC 2024 - 6.3K bytes - Viewed (0) -
platforms/core-runtime/files/src/main/java/org/gradle/internal/file/FileModeAccessor.java
import java.io.File; public interface FileModeAccessor { /** * @param f The file to get the mode for. Note that all symlinks are followed. * @return The unix mode of the file */ int getUnixMode(File f) throws Exception;
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 16 15:50:56 UTC 2024 - 898 bytes - Viewed (0)