Method: PHPCrawler::setWorkingDirectory()

Sets the working-directory the crawler should use for storing temporary data.

public setWorkingDirectory($directory)


$directory string The working-directory


bool  TRUE on success, otherwise false.


Every instance of the crawler needs and creates a temporary directory for storing some
internal data.

This setting defines which base-directory the crawler will use to store the temporary
directories in. By default, the crawler uses the systems temp-directory as working-directory.
(i.e. "/tmp/" on linux-systems)

All temporary directories created in the working-directory will be deleted automatically
after a crawling-process has finished.

NOTE: To speed up the performance of a crawling-process (especially when using the
SQLite-urlcache), try to set a mounted shared-memory device as working-direcotry
(i.e. "/dev/shm/" on Debian/Ubuntu-systems).