implement ls function, reference AdrianHuang's implement
implement cat command.