I have used wholeTextFiles from SparkSession, sparkContext.
The wholeTextFiles(Inputpath) returns (filename, content). if the Inputpath is "C:\\Xiang\\foldername