Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 17 of 17 for O_TRUNC (0.82 sec)

  1. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  2. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  3. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/smb1/SmbFileInputStream.java

            this.access = openFlags >>> 16 & 0xFFFF;
            if (file.type != SmbFile.TYPE_NAMED_PIPE) {
                file.open(openFlags, access, SmbFile.ATTR_NORMAL, 0);
                this.openFlags &= ~(SmbFile.O_CREAT | SmbFile.O_TRUNC);
            } else {
                file.connect0();
            }
            readSize = Math.min(file.tree.session.transport.rcv_buf_size - 70, file.tree.session.transport.server.maxBufferSize - 70);
        }
    
        /**
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  5. 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: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.6K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbFile.java

        private static void setCreateDisposition(final Smb2CreateRequest req, final int flags) {
            if ((flags & SmbConstants.O_TRUNC) == O_TRUNC && (flags & SmbConstants.O_CREAT) == O_CREAT) {
                req.setCreateDisposition(Smb2CreateRequest.FILE_OVERWRITE_IF);
            } else if ((flags & SmbConstants.O_TRUNC) == O_TRUNC) {
                req.setCreateDisposition(Smb2CreateRequest.FILE_OVERWRITE);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 103.2K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb1/smb1/SmbFile.java

        // create if the file does not exist
        static final int O_CREAT = 0x0010;
        // fail if the file exists
        static final int O_EXCL = 0x0020;
        // truncate if the file exists
        static final int O_TRUNC = 0x0040;
    
        // share access
        /**
         * When specified as the {@code shareAccess} constructor parameter,
         * other SMB clients (including other threads making calls into jCIFS)
    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