File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1755,12 +1755,19 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
17551755/// 
17561756/// [changes]: ../io/index.html#platform-specific-behavior 
17571757/// 
1758+ /// **NOTE**: If a parent of the given path doesn't exist, this function will 
1759+ /// return an error. To create a directory and all its missing parents at the 
1760+ /// same time, use the [`create_dir_all`] function. 
1761+ /// 
17581762/// # Errors 
17591763/// 
17601764/// This function will return an error in the following situations, but is not 
17611765/// limited to just these cases: 
17621766/// 
17631767/// * User lacks permissions to create directory at `path`. 
1768+ /// * A parent of the given path doesn't exist. (To create a directory and all 
1769+ ///   its missing parents at the same time, use the [`create_dir_all`] 
1770+ ///   function.) 
17641771/// * `path` already exists. 
17651772/// 
17661773/// # Examples 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments