by Guillermo Madero S..
Hi Meher,
Files are managed in a very different way in Moodle 2.
Please see the following documentation page: Moodle file handling, and do check the See also links at the end (e.g. Course files).
While the File API internals page is a bit technical, please make sure to read at least up to the File serving section (included) as this will help you get a better idea of how the new file handling method works in Moodle 2.x.
You will also need to check the Legacy course files pages (versions 2.0 and 2.6) and the Legacy files search results.
Some brief references: