Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for canWrite (0.67 sec)

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

                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");
            }
    
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbFileTest.java

                assertTrue(smbFile.canWrite());
            }
    
            @Test
            void testCannotWriteReadOnlyFile() throws SmbException {
                // Arrange
                // Mock the canWrite method directly since it uses internal fields
                doReturn(false).when(smbFile).canWrite();
    
                // Act & Assert
                assertFalse(smbFile.canWrite());
            }
    
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbFileIntegrationTest.java

            // Test setting attributes
            file.setReadOnly();
            assertFalse(file.canWrite(), "Should not be writable when read-only");
    
            file.setReadWrite();
            assertTrue(file.canWrite(), "Should be writable after setReadWrite");
        }
    
        @Test
        void testFileOverwriteWithDifferentContent() throws Exception {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 56K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/curl/CurlTest.java

            // ## 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
        public void test_AllHttpMethodFactories() {
    Registered: Sat Dec 20 09:13:53 UTC 2025
    - Last Modified: Thu Nov 20 13:34:13 UTC 2025
    - 16.3K bytes
    - Viewed (0)
  5. fess-crawler/src/test/java/org/codelibs/fess/crawler/util/ResponseDataUtilTest.java

            assertNotNull(tempFile);
            assertTrue(tempFile.exists());
    
            // Verify file permissions (readable and writable by owner)
            assertTrue(tempFile.canRead());
            assertTrue(tempFile.canWrite());
    
            // Clean up
            tempFile.delete();
        }
    
        public void test_createResponseBodyFile_exceptionOnRead() {
            // Create a mock ResponseData that throws exception
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Sat Nov 22 13:28:22 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  6. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb/SmbClient.java

         * @param src The source SmbFile.
         * @param dest The destination File.
         */
        private void copy(final SmbFile src, final File dest) {
            if (dest.exists() && !dest.canWrite()) {
                return;
            }
            try (BufferedInputStream in = new BufferedInputStream(new SmbFileInputStream(src));
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 23.4K bytes
    - Viewed (3)
  7. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/smb1/SmbClient.java

         * @param src The source SmbFile.
         * @param dest The destination File.
         */
        private void copy(final SmbFile src, final File dest) {
            if (dest.exists() && !dest.canWrite()) {
                return;
            }
            try (BufferedInputStream in = new BufferedInputStream(new SmbFileInputStream(src));
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 23.3K bytes
    - Viewed (0)
  8. src/main/java/jcifs/SmbResource.java

         *
         * @return <code>true</code> if the resource exists is not marked
         *         read-only
         * @throws CIFSException if an error occurs accessing the resource
         */
        boolean canWrite() throws CIFSException;
    
        /**
         * Tests to see if the file this <code>SmbResource</code> represents can be
         * read. Because any file, directory, or other resource can be read if it
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 28K bytes
    - Viewed (1)
  9. src/main/java/jcifs/smb/SmbFile.java

                return true;
            }
            return exists(); // try opening and catch sharing violation?
        }
    
        @Override
        public boolean canWrite() throws SmbException {
            if (getType() == TYPE_NAMED_PIPE) { // try opening the pipe for writing?
                return true;
            }
            return exists() && (this.attributes & ATTR_READONLY) == 0;
        }
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 103.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/smb1/SmbFile.java

         * @return  <code>true</code> if the resource exists is not marked
         *          read-only
         * @throws SmbException if an error occurs while checking write permissions
         */
    
        public boolean canWrite() throws SmbException {
            if (getType() == TYPE_NAMED_PIPE) { // try opening the pipe for writing?
                return true;
            }
            return exists() && (attributes & ATTR_READONLY) == 0;
        }
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 112.2K bytes
    - Viewed (0)
Back to top