Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for canWrite (0.05 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
  2. cmd/storage-rest-server.go

    	bodyDoneCh := make(chan struct{})
    	doneCh := make(chan error)
    	ctx := r.Context()
    	go func() {
    		canWrite := true
    		write := func(b []byte) {
    			if canWrite {
    				n, err := w.Write(b)
    				if err != nil || n != len(b) {
    					canWrite = false
    				}
    			}
    		}
    		// Wait for body to be read.
    		select {
    		case <-ctx.Done():
    		case <-bodyDoneCh:
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Tue May 27 15:19:03 UTC 2025
    - 45.7K bytes
    - Viewed (0)
  3. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  4. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 56K bytes
    - Viewed (0)
  5. 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: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Thu Jul 31 01:01:12 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/thumbnail/ThumbnailGeneratorTest.java

                    return false;
                }
    
                // Check if parent directory is writable
                File parentDir = outputFile.getParentFile();
                if (parentDir != null && !parentDir.canWrite()) {
                    return false;
                }
    
                // Simulate thumbnail generation
                try {
                    if (!outputFile.exists()) {
                        outputFile.createNewFile();
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  7. 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: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Thu Sep 18 09:30:45 UTC 2025
    - 22.5K bytes
    - Viewed (0)
  8. 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: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Thu Sep 18 09:30:45 UTC 2025
    - 23K bytes
    - Viewed (0)
  9. 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();
        }
    
        public void test_calibrateCpuLoad_withTimeout() {
            systemHelper.setSystemCpuCheckInterval(100L);
            final boolean result = systemHelper.calibrateCpuLoad(1L);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 19 23:49:30 UTC 2025
    - 28.9K bytes
    - Viewed (0)
  10. 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: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 28K bytes
    - Viewed (1)
Back to top