Properly handle various data types for FileInfo.patch and FileInfo.extract