Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for renameTo (0.05 sec)

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

                verify(mockResource).renameTo(destination);
                verify(mockResource).renameTo(destination, true);
            }
    
            @Test
            @DisplayName("renameTo should throw NullPointerException for null destination")
            void testRenameTo_NullDestination() throws CIFSException {
                // Given
                doThrow(new NullPointerException("dest argument is null")).when(mockResource).renameTo(null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 35K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbFileTest.java

            void testRenameToSameFile() throws MalformedURLException, SmbException {
                // Arrange
                doThrow(new SmbException("Cannot rename to same file")).when(smbFile).renameTo(smbFile);
    
                // Act & Assert
                assertThrows(SmbException.class, () -> smbFile.renameTo(smbFile));
            }
    
            @Test
            void testCreateNewFileWhenExists() throws SmbException, IOException {
                // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  3. compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java

                // File.renameTo operation doesn't really work across file systems.
                // So we will attempt to do a File.renameTo for efficiency and atomicity, if this fails
                // then we will use a brute force copy and delete the temporary file.
                if (!temp.renameTo(destination)) {
                    try {
                        Files.copy(
    Registered: Sun Sep 07 03:35:12 UTC 2025
    - Last Modified: Sat Apr 05 11:52:05 UTC 2025
    - 29.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/FilesTest.java

          super(file.getPath());
          this.canRename = canRename;
          this.canDelete = canDelete;
        }
    
        @Override
        public boolean renameTo(File to) {
          return canRename && super.renameTo(to);
        }
    
        @Override
        public boolean delete() {
          return canDelete && super.delete();
        }
    
        private static final long serialVersionUID = 0;
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/FilesTest.java

          super(file.getPath());
          this.canRename = canRename;
          this.canDelete = canDelete;
        }
    
        @Override
        public boolean renameTo(File to) {
          return canRename && super.renameTo(to);
        }
    
        @Override
        public boolean delete() {
          return canDelete && super.delete();
        }
    
        private static final long serialVersionUID = 0;
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/SmbResource.java

         * @throws NullPointerException
         *             If the <code>dest</code> argument is <code>null</code>
         */
        void renameTo(SmbResource dest) throws CIFSException;
    
        /**
         * Changes the name of the file this <code>SmbResource</code> represents to the name
         * designated by the <code>SmbResource</code> argument.
         * <br>
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 28K bytes
    - Viewed (1)
  7. src/main/java/jcifs/smb/SmbFile.java

            return SmbEnumerationUtil.doEnum(this, "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, filter);
        }
    
        @Override
        public void renameTo(final SmbResource d) throws SmbException {
            renameTo(d, false);
        }
    
        @Override
        public void renameTo(final SmbResource d, final boolean replace) throws SmbException {
            if (!(d instanceof final SmbFile dest)) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 103.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/Files.java

        checkNotNull(from);
        checkNotNull(to);
        checkArgument(!from.equals(to), "Source %s and destination %s must be different", from, to);
    
        if (!from.renameTo(to)) {
          copy(from, to);
          if (!from.delete()) {
            if (!to.delete()) {
              throw new IOException("Unable to delete " + to);
            }
            throw new IOException("Unable to delete " + from);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Files.java

        checkNotNull(from);
        checkNotNull(to);
        checkArgument(!from.equals(to), "Source %s and destination %s must be different", from, to);
    
        if (!from.renameTo(to)) {
          copy(from, to);
          if (!from.delete()) {
            if (!to.delete()) {
              throw new IOException("Unable to delete " + to);
            }
            throw new IOException("Unable to delete " + from);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/smb1/SmbFile.java

            }
    
            if (LogStream.level >= 3) {
                log.println("renameTo: " + unc + " -> " + dest.unc);
            }
    
            attrExpiration = sizeExpiration = 0;
            dest.attrExpiration = 0;
    
            /*
             * Rename Request / Response
             */
    
            send(new SmbComRename(unc, dest.unc), blank_resp());
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 112.2K bytes
    - Viewed (0)
Back to top