Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for O_TRUNC (0.03 sec)

  1. src/test/java/jcifs/smb/SmbFileOutputStreamTest.java

            when(mockWriteResponse.getCount()).thenReturn(1);
    
            outputStream = new SmbFileOutputStream(mockFile, mockTreeHandle, mockFileHandle,
                    SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_TRUNC, SmbConstants.FILE_WRITE_DATA,
                    SmbConstants.DEFAULT_SHARING);
    
            // When
            outputStream.write(65); // Write 'A'
    
            // Then
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.8K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb/SmbCopyUtil.java

            try {
                return dest.openUnshared(SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_TRUNC,
                        SmbConstants.FILE_WRITE_DATA | SmbConstants.FILE_WRITE_ATTRIBUTES | (alsoRead ? SmbConstants.FILE_READ_DATA : 0),
                        SmbConstants.FILE_NO_SHARE, attrs, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/SmbFileOutputStream.java

            this(file, append,
                    append ? SmbFile.O_CREAT | SmbFile.O_WRONLY | SmbFile.O_APPEND : SmbFile.O_CREAT | SmbFile.O_WRONLY | SmbFile.O_TRUNC);
        }
    
        /**
         * Creates an {@link java.io.OutputStream} for writing bytes to a file
         * on an SMB server addressed by the <code>SmbFile</code> parameter. See
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 11K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/SmbFileOutputStream.java

            this(file, append, append ? SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_APPEND
                    : SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_TRUNC, 0, SmbConstants.DEFAULT_SHARING);
        }
    
        SmbFileOutputStream(final SmbFile file, final boolean append, final int openFlags, final int access, final int sharing)
                throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  5. src/test/java/jcifs/SmbConstantsTest.java

            assertEquals(0x04, SmbConstants.O_APPEND);
            assertEquals(0x0010, SmbConstants.O_CREAT);
            assertEquals(0x0020, SmbConstants.O_EXCL);
            assertEquals(0x0040, SmbConstants.O_TRUNC);
        }
    
        @Test
        @DisplayName("Should define copy/move flags constants")
        void testCopyMoveFlags() {
            assertEquals(0x0001, SmbConstants.FLAGS_TARGET_MUST_BE_FILE);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbFileTest.java

                var outputStream = smbFile.getOutputStream();
    
                // Assert
                assertNotNull(outputStream);
                verify(smbFile).openUnshared(SmbConstants.O_CREAT | SmbConstants.O_WRONLY | SmbConstants.O_TRUNC, // 82
                        SmbConstants.O_WRONLY, // 2
                        SmbConstants.DEFAULT_SHARING, // 7, not FILE_SHARE_READ (1)
                        SmbConstants.ATTR_NORMAL, // 128
                        0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  7. src/main/java/jcifs/SmbConstants.java

         */
        int O_CREAT = 0x0010;
        /**
         * Fail if the file exists.
         */
        int O_EXCL = 0x0020;
        /**
         * Truncate file if it exists.
         */
        int O_TRUNC = 0x0040;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbFileInputStream.java

                this.smb2 = th.isSMB2();
                if (file.getType() != SmbConstants.TYPE_NAMED_PIPE) {
                    try (SmbFileHandle h = ensureOpen()) {}
                    this.openFlags &= ~(SmbConstants.O_CREAT | SmbConstants.O_TRUNC);
                }
    
                init(th);
            } catch (final CIFSException e) {
                throw SmbException.wrap(e);
            }
        }
    
        /**
         * @throws SmbException
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.6K bytes
    - Viewed (0)
Back to top