Returns the file, folder or both structure from a given source in JSON or YML