Cloner
class Cloner implements WriterInterface (View source)
Class that save the package files to a new directory.
Properties
| protected string | $destinationDirectory | The absolute path to the destination directory.  | 
                |
| protected bool | $overwrite | Overwrite files if they already exist in the destination directory?  | 
                |
| protected OutputInterface | $output | ||
| protected Filesystem | $fs | ||
| protected array | $directoriesToAdd | ||
| protected array | $filesToAdd | 
Methods
                    __construct(string $destinationDirectory, bool $overwrite, OutputInterface $output, Filesystem $fs)
        
                                            
                
            Initialize the instance.
                    $this
                
                
                
            
                    completed()
        
                                            
                
            Called after all the files have been processed succesfully.
                    createDestinationDirectory()
        
                                            
                
            Create the destination directory.
                    createDirectory(string $relativePath)
        
                                            
                
            Create a directory in the destination directory.
                    copyFile(string $sourceFile, string $relativePath)
        
                                            
                
            Copy a file.
Details
        
                            
    __construct(string $destinationDirectory, bool $overwrite, OutputInterface $output, Filesystem $fs)
        
    
    Initialize the instance.
        
                            $this
    add(PackerFile $file)
        
    
    Add a file/directory.
        
                            
    completed()
        
    
    Called after all the files have been processed succesfully.
        
                    protected        
    createDestinationDirectory()
        
    
    Create the destination directory.
        
                    protected        
    createDirectory(string $relativePath)
        
    
    Create a directory in the destination directory.
        
                    protected        
    copyFile(string $sourceFile, string $relativePath)
        
    
    Copy a file.