add an interface for the file operation which is used by fileVisitor