Put folder in theme via plugin

You may be thinking about this in the wrong sense. What are you using the CSS and images for? You should be using wp_enqueue_script/wp_register_script for css and the images would be specific to your use case.

You can just use PHP built in functions to copy files:
http://www.php.net/manual/en/function.copy.php

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)