Skip to content

YouweGit/file-mapping

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File mapping

A PHP package for mapping files from one location to another. It is used by the youwe/composer-file-installer package to move installed files according to the location mapping.

Usage examples

<?php 
/** 
* Create a mapping.
*/
 $mapping = new UnixFileMapping(
      __DIR__ . '/../folder/files',
      getcwd(),
      ['./dir/one','./dir/two']
      
  );

/**
* Get the relative path to the source file.
*/
$mapping->getRelativeSource();

/**
* Get the absolute path to the source file.
*/
$mapping->getSource();

/**
* Get the relative path to the destination file.
*/
$mapping->getRelativeDestination();

/**
* Get the absolute path to the destination file.
*/
$mapping->getDestination();

About

Map files from one path to another.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%