mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	clarify behavior of shutil.move when destination exists (closes #22933)
Patch by Mike Short.
This commit is contained in:
		
							parent
							
								
									ce8f5ded65
								
							
						
					
					
						commit
						218144a94d
					
				
					 1 changed files with 3 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -287,12 +287,9 @@ Directory and files operations
 | 
			
		|||
   Recursively move a file or directory (*src*) to another location (*dst*)
 | 
			
		||||
   and return the destination.
 | 
			
		||||
 | 
			
		||||
   If the destination is a directory or a symlink to a directory, then *src* is
 | 
			
		||||
   moved inside that directory.
 | 
			
		||||
 | 
			
		||||
   The destination directory must not already exist.  If the destination already
 | 
			
		||||
   exists but is not a directory, it may be overwritten depending on
 | 
			
		||||
   :func:`os.rename` semantics.
 | 
			
		||||
   If the destination is an existing directory, then *src* is moved inside that
 | 
			
		||||
   directory. If the destination already exists but is not a directory, it may
 | 
			
		||||
   be overwritten depending on :func:`os.rename` semantics.
 | 
			
		||||
 | 
			
		||||
   If the destination is on the current filesystem, then :func:`os.rename` is
 | 
			
		||||
   used.  Otherwise, *src* is copied (using :func:`shutil.copy2`) to *dst* and
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue