modify read file function

add BFS read
Revert "modify read file function"

This reverts commit 7fdb2c22509e4a6ab1ffa49a8be66a8189e7a96e.
Modify File read method

BFS and DFS