Generic read method to read data from a file or a folder.
read(file, ...)
file
path to the file or folder to be read
...
extra arguments
the object representation of the data contained in the file