Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 38 for canRead (0.07 seconds)

  1. src/test/java/jcifs/SmbResourceTest.java

                // Given
                when(mockResource.canRead()).thenReturn(true);
                when(mockResource.canWrite()).thenReturn(false);
    
                // When
                boolean canRead = mockResource.canRead();
                boolean canWrite = mockResource.canWrite();
    
                // Then
                assertTrue(canRead, "Should be readable");
                assertFalse(canWrite, "Should not be writable");
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 35K bytes
    - Click Count (0)
  2. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

            assertTrue(initialFile.exists(), "Initial file should exist");
            assertTrue(initialFile.isFile(), "Initial file should be a file");
            assertTrue(initialFile.canRead(), "Should be able to read initial file");
    
            log.info("Basic connectivity test passed - can connect, list, and read files");
        }
    
        @Test
        void testCreateNewFile() throws Exception {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 56K bytes
    - Click Count (0)
  3. src/main/java/jcifs/SmbResource.java

         *
         * @return <code>true</code> if the file is read-only
         * @throws CIFSException if an error occurs accessing the resource
         */
        boolean canRead() throws CIFSException;
    
        /**
         * Turn off the read-only attribute of this file. This is shorthand for
         * <code>setAttributes( getAttributes() &amp; ~ATTR_READONLY )</code>.
         *
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 28K bytes
    - Click Count (1)
  4. src/test/java/org/codelibs/curl/CurlTest.java

            final File tmpDir = Curl.tmpDir;
    
            // ## Assert ##
            assertNotNull(tmpDir);
            assertTrue(tmpDir.exists());
            assertTrue(tmpDir.isDirectory());
            assertTrue(tmpDir.canRead());
            assertTrue(tmpDir.canWrite());
            assertEquals(new File(System.getProperty("java.io.tmpdir")).getAbsolutePath(), tmpDir.getAbsolutePath());
        }
    
        @Test
    Created: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Thu Nov 20 13:34:13 GMT 2025
    - 16.3K bytes
    - Click Count (0)
  5. compat/maven-compat/src/main/java/org/apache/maven/project/artifact/DefaultMavenMetadataCache.java

                    this.managedVersions = ArtifactUtils.copyArtifacts(managedVersions, new LinkedHashMap<>());
                }
    
                File pomFile = pomArtifact.getFile();
                if (pomFile != null && pomFile.canRead()) {
                    this.length = pomFile.length();
                    this.timestamp = pomFile.lastModified();
                } else {
                    this.length = -1;
                    this.timestamp = -1;
                }
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Jun 06 14:28:57 GMT 2025
    - 11.8K bytes
    - Click Count (0)
  6. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/fs/FileSystemClient.java

                    responseData.setCharSet(getCharSet(file));
                    responseData.setLastModified(new Date(file.lastModified()));
                    if (file.canRead()) {
                        final MimeTypeHelper mimeTypeHelper = crawlerContainer.getComponent("mimeTypeHelper");
                        try (final InputStream is = new BufferedInputStream(new FileInputStream(file))) {
    Created: Sun Apr 12 03:50:13 GMT 2026
    - Last Modified: Sun Nov 23 12:19:14 GMT 2025
    - 15.1K bytes
    - Click Count (0)
  7. src/test/java/jcifs/smb/SmbFileTest.java

                // Arrange
                doReturn(false).when(smbFile).isDirectory();
                doReturn(true).when(smbFile).exists();
    
                // Act & Assert
                assertTrue(smbFile.canRead());
            }
    
            @Test
            void testCanWrite() throws SmbException {
                // Arrange
                doReturn(0).when(smbFile).getAttributes(); // No read-only attribute
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.8K bytes
    - Click Count (0)
  8. src/main/java/jcifs/smb1/smb1/SmbFile.java

         *
         * @return <code>true</code> if the file is read-only
         * @throws SmbException if an error occurs while checking read permissions
         */
    
        public boolean canRead() throws SmbException {
            if (getType() == TYPE_NAMED_PIPE) { // try opening the pipe for reading?
                return true;
            }
            return exists(); // try opening and catch sharing violation?
        }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 112.2K bytes
    - Click Count (0)
  9. src/main/java/jcifs/smb/SmbFile.java

                }
                return new SmbWatchHandleImpl(openUnshared(O_RDONLY, READ_CONTROL | GENERIC_READ, DEFAULT_SHARING, 0, 1), filter, recursive);
            }
        }
    
        @Override
        public boolean canRead() throws SmbException {
            if (getType() == TYPE_NAMED_PIPE) { // try opening the pipe for reading?
                return true;
            }
            return exists(); // try opening and catch sharing violation?
        }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 103.2K bytes
    - Click Count (0)
  10. src/test/java/org/codelibs/fess/helper/SystemHelperTest.java

            final File tempFile = systemHelper.createTempFile("test", ".tmp");
            assertNotNull(tempFile);
            assertTrue(tempFile.exists());
            assertTrue(tempFile.canRead());
            assertTrue(tempFile.canWrite());
            tempFile.delete();
        }
    
        @Test
        public void test_calibrateCpuLoad_withTimeout() {
            systemHelper.setSystemCpuCheckInterval(100L);
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 28 06:59:19 GMT 2026
    - 44.4K bytes
    - Click Count (0)
Back to Top