Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for getAttributes (0.36 sec)

  1. src/test/java/jcifs/internal/fscc/BasicFileInformationTest.java

            assertEquals(originalInfo.getLastAccessTime(), decodedInfo.getLastAccessTime());
            assertEquals(originalInfo.getLastWriteTime(), decodedInfo.getLastWriteTime());
            assertEquals(originalInfo.getAttributes(), decodedInfo.getAttributes());
        }
    
        @Test
        @DisplayName("Test with various attribute flags")
        void testWithVariousAttributeFlags() {
            // Test common file attribute combinations
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/fscc/FileBasicInfoTest.java

            assertEquals(original.getLastAccessTime(), decoded.getLastAccessTime());
            assertEquals(original.getLastWriteTime(), decoded.getLastWriteTime());
            assertEquals(original.getAttributes(), decoded.getAttributes());
        }
    
        @Test
        @DisplayName("Test toString method")
        void testToString() {
            FileBasicInfo info =
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/FileEntryTest.java

                    Arguments.of((IntGetter) FileEntry::getType, Integer.MAX_VALUE, "max type"),
    
                    Arguments.of((IntGetter) FileEntry::getAttributes, 0, "no attributes"),
                    Arguments.of((IntGetter) FileEntry::getAttributes, 0xFFFF, "many attributes"),
    
                    Arguments.of((IntGetter) FileEntry::getFileIndex, -5, "negative index"),
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb1/smb1/Trans2QueryPathInformationResponseTest.java

                // Verify interactions
                assertEquals(0x20, response.info.getAttributes());
                assertEquals(1024L, response.info.getSize());
                assertEquals(1000000L, response.info.getCreateTime());
                assertEquals(2000000L, response.info.getLastWriteTime());
    
                // Verify the mock was called
                verify(mockInfo).getAttributes();
                verify(mockInfo).getSize();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/net/SmbShareInfoTest.java

            assertEquals(SmbConstants.TYPE_SHARE, info.getType());
        }
    
        @Test
        @DisplayName("Test getAttributes always returns readonly directory")
        void testGetAttributes() {
            // Default instance
            assertEquals(SmbConstants.ATTR_READONLY | SmbConstants.ATTR_DIRECTORY, shareInfo.getAttributes());
    
            // Instance with values - attributes are still constant
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb2/lease/DirectoryLeasingIntegrationTest.java

            when(mockFile1.length()).thenReturn(2048L);
            when(mockFile1.lastModified()).thenReturn(System.currentTimeMillis() - 3600000);
            when(mockFile1.isDirectory()).thenReturn(false);
            when(mockFile1.getAttributes()).thenReturn(0x20); // FILE_ATTRIBUTE_ARCHIVE
            when(mockFile1.createTime()).thenReturn(System.currentTimeMillis() - 7200000);
            when(mockFile1.lastAccess()).thenReturn(System.currentTimeMillis() - 1800000);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbCopyUtilTest.java

                    .thenReturn(handle); // second attempt succeeds
    
            // dest currently has READONLY attribute set
            int currentAttrs = SmbConstants.ATTR_READONLY | SmbConstants.ATTR_ARCHIVE;
            when(dest.getAttributes()).thenReturn(currentAttrs);
    
            int desiredAttrs = SmbConstants.ATTR_NORMAL;
    
            // Act
            SmbFileHandleImpl result = SmbCopyUtil.openCopyTargetFile(dest, desiredAttrs, false);
    
            // Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbCopyUtil.java

                    dest.mkdir();
                    if (dh.hasCapability(SmbConstants.CAP_NT_SMBS)) {
                        dest.setPathInformation(src.getAttributes(), src.createTime(), src.lastModified(), src.lastAccess());
                    } else {
                        dest.setPathInformation(src.getAttributes(), 0L, src.lastModified(), 0L);
                    }
                } catch (final SmbUnsupportedOperationException e) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbFileTest.java

                // Arrange
                doReturn(SmbConstants.ATTR_NORMAL).when(smbFile).getAttributes();
                doNothing().when(smbFile).setAttributes(anyInt());
    
                // Act
                smbFile.setReadOnly();
    
                // Assert
                verify(smbFile).setAttributes(SmbConstants.ATTR_NORMAL | SmbConstants.ATTR_READONLY);
            }
    
            @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)
  10. src/test/java/jcifs/internal/smb2/lease/DirectoryLeaseManagerTest.java

            when(mockFile1.length()).thenReturn(1024L);
            when(mockFile1.lastModified()).thenReturn(1000L);
            when(mockFile1.isDirectory()).thenReturn(false);
            when(mockFile1.getAttributes()).thenReturn(0x20);
            when(mockFile1.createTime()).thenReturn(500L);
            when(mockFile1.lastAccess()).thenReturn(800L);
    
            when(mockFile2.getName()).thenReturn("dir1");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 01:47:47 UTC 2025
    - 15.9K bytes
    - Viewed (0)
Back to top