Get directories & files of a theme in module How can I scan a directory and its files from a module? Is there any permission issue?
I have to apply some logic based on the folder structure in the active theme.

When I use the below code, its returning empty

file_scan_directory($path,$depth=0);


I am getting the path to theme by below code:

$path = base_path() . drupal_get_path('theme','sandesh').'/'.'layouts';


Is this the wrong method to this? Or is there any other apis for that.
You are mixing filesystem path and URL path: 


base_path(): Returns the base URL path (i.e., directory)
of the Drupal installation.
drupal_get_path(): Returns the path to a system item (module, theme, etc.).


The second argument for file_scan_directory() is the preg_match() regular expression of the files to find. You are using '0' which only match a single file named '0'.

file_scan_directory(DRUPAL_ROOT  . '/' . drupal_get_path('theme','sandesh') . '/' . 'layouts'); is all you need to do. Use base_path() only when building URL for which an existing helper function (url(), file_create_url(), etc.) cannot be used.