Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

copy(): The first argument to copy() function cannot be a directory #539

Closed
montogeek opened this issue Mar 18, 2015 · 5 comments
Closed

Comments

@montogeek
Copy link

I get that error doing
$faker->file()

The /tmp folder exists.
PHP 5.4.38 (cli) (built: Feb 20 2015 02:42:34)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

CentOS 6.2

@vuchl
Copy link

vuchl commented Mar 18, 2015

What are your parameters for $faker->file(); like $faker->file($sourceDir, $targetDir, false)

@montogeek
Copy link
Author

I didnt use any parameters, just file()

@fzaninotto
Copy link
Owner

file() returns a random file from the source directory (here `/tmp). I suspect it fails because this directory is empty, am I right?

@fzaninotto
Copy link
Owner

Sorry, I just understood the source of the problem (#547). Continuing discussion there.

@fzaninotto
Copy link
Owner

Fixed by #547

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants