Refactor #5580: Add new file&directory apis into FileUtils and test cases

Some issue:
* BOOL -> bool
* NULL -> nullptr
* why not implement this function based on `FileUtils::createDirectory`?