If you have a folder with linked files such as a website with an index.html file or a flash activity with xml/swf and index file then you use the file resource instead of the folder resource. See File module settings for details.
You can add a folder to your course by either creating a folder or uploading a zipped file. It is not possible to link to a folder in a repository. See the forum discussion How do we link to an existing directory in 2.0? for more details.