1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-22 00:09:59 +01:00

Updated readme for fileCopy

This commit is contained in:
Stefano Sala 2014-03-11 11:32:14 +01:00
parent 4a919df3d2
commit b581de5dd1

View File

@ -193,6 +193,15 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle
### `Faker\Provider\File`
/**
* Copy a random file from the source directory to the target directory and returns the filename/fullpath
*
* @param string $sourceDirectory The directory to look for random file taking
* @param string $targetDirectory
* @param boolean $fullPath Wether to have the full path or just the filename
*/
fileCopy($sourceDir, $targetDir) // '/path/to/targetDir/13b73edae8443990be1aa8f1a483bc27.jpg'
fileCopy($sourceDir, $targetDir, false) // '13b73edae8443990be1aa8f1a483bc27.jpg'
fileExtension // 'avi'
mimeType // 'video/x-msvideo'