stream wrapper public /private not found Error Configuration : WAMP on windows drupal 7 

I have tried using 

$image = file_get_contents('E:\Team_Install\wamp\www\rootfolder\sites\all\modules\my_module\errorwinmobilesdk.jpg');
$file = file_save_data($image, 'public://',FILE_EXISTS_REPLACE); 


I can see the result after first line file_get_contents but on file_save_data I get that destination folder invalid error 

Another method I had tried was  $file = file_copy($source, $dest);

here also it says $dest does not exists 
Wrapper folder permission and path are check thorughly they are working when I add an image using media_gallery module as it saves to public gallery or creates a new article with image, when I try to add from code it breaks and start showing message 


  The data could not be saved because the destination public is
  invalid. This may be caused by improper use of file_save_data() or a
  missing stream wrapper.


Please help I am new to drupal and stuck at this. 

Thanks in advance
I had this problem too after some coding with file_save_data. And i solve it after clearing the cache and resaving the path in the file system configuration at admin/config/media/file-system.

My problem comes from an add field of file type, programmatically in an update.