Repository: apache/iceberg (language: python)

Issue:
API, Core: Replace deprecated ContentFile#path usage with location
This change replaces the deprecated ContentFile#path usage with the recommended `location` API in the API, Core modules. Will have separate PRs for the other modules, just limited to Core/API for now for reviewer sanity.

See https://github.com/apache/iceberg/pull/11092 for context on why path was deprecated.


Discussion / hints:
Thanks @nastra @Fokko @jbonofre for reviewing! I'll go ahead and merge

Fix patch:
diff --git a/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowReader.java b/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowReader.java
index dd2b1e0221e4..7bd744ec5bf3 100644
--- a/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowReader.java
+++ b/arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowReader.java
@@ -260,7 +260,7 @@ private static final class VectorizedCombinedScanIterator
       Map<String, ByteBuffer> keyMetadata = Maps.newHashMap();
       fileTasks.stream()
           .map(FileScanTask::file)
-          .forEach(file -> keyMetadata.put(file.path().toString(), file.keyMetadata()));
+          .forEach(file -> keyMetadata.put(file.location(), file.keyMetadata()));
 
       Stream<EncryptedInputFile> encrypted =
           keyMetadata.entrySet().stream()
@@ -364,7 +364,7 @@ public void close() throws IOException {
 
     private InputFile getInputFile(FileScanTask task) {
       Preconditions.checkArgument(!task.isDataTask(), "Invalid task type");
-      return inputFiles.get(task.file().path().toString());
+      return inputFiles.get(task.file().location());
     }
 
     /**
diff --git a/core/src/main/java/org/apache/iceberg/encryption/InputFilesDecryptor.java b/core/src/main/java/org/apache/iceberg/encryption/InputFilesDecryptor.java
index 44cd38c58621..678d405fd7c9 100644
--- a/core/src/main/java/org/apache/iceberg/encryption/InputFilesDecryptor.java
+++ b/core/src/main/java/org/apache/iceberg/encryption/InputFilesDecryptor.java
@@ -40,7 +40,7 @@ public InputFilesDecryptor(
         .flatMap(
             fileScanTask ->
                 Stream.concat(Stream.of(fileScanTask.file()), fileScanTask.deletes().stream()))
-        .forEach(file -> keyMetadata.put(file.path().toString(), file.keyMetadata()));
+        .forEach(file -> keyMetadata.put(file.location(), file.keyMetadata()));
     Stream<EncryptedInputFile> encrypted =
         keyMetadata.entrySet().stream()
             .map(
diff --git a/data/src/main/java/org/apache/iceberg/data/BaseDeleteLoader.java b/data/src/main/java/org/apache/iceberg/data/BaseDeleteLoader.java
index 796f4f92be33..1b7a92f0682b 100644
--- a/data/src/main/java/org/apache/iceberg/data/BaseDeleteLoader.java
+++ b/data/src/main/java/org/apache/iceberg/data/BaseDeleteLoader.java
@@ -119,7 +119,7 @@ public StructLikeSet loadEqualityDeletes(Iterable<DeleteFile> deleteFiles, Schem
   private Iterable<StructLike> getOrReadEqDeletes(DeleteFile deleteFile, Schema projection) {
     long estimatedSize = estimateEqDeletesSize(deleteFile, projection);
     if (canCache(estimatedSize)) {
-      String cacheKey = deleteFile.path().toString();
+      String cacheKey = deleteFile.location();
       return getOrLoad(cacheKey, () -> readEqDeletes(deleteFile, projection), estimatedSize);
     } else {
       return readEqDeletes(deleteFile, projection);
@@ -199,7 +199,7 @@ private PositionDeleteIndex getOrReadPosDeletes(
   private PositionDeleteIndex getOrReadPosDeletes(DeleteFile deleteFile, CharSequence filePath) {
     long estimatedSize = estimatePosDeletesSize(deleteFile);
     if (canCache(estimatedSize)) {
-      String cacheKey = deleteFile.path().toString();
+      String cacheKey = deleteFile.location();
       CharSequenceMap<PositionDeleteIndex> indexes =
           getOrLoad(cacheKey, () -> readPosDeletes(deleteFile), estimatedSize);
       return indexes.getOrDefault(filePath, PositionDeleteIndex.empty());
@@ -227,7 +227,7 @@ private CloseableIterable<Record> openDeletes(
       DeleteFile deleteFile, Schema projection, Expression filter) {
 
     FileFormat format = deleteFile.format();
-    LOG.trace("Opening delete file {}", deleteFile.path());
+    LOG.trace("Opening delete file {}", deleteFile.location());
     InputFile inputFile = loadInputFile.apply(deleteFile);
 
     switch (format) {
diff --git a/data/src/main/java/org/apache/iceberg/data/DeleteFilter.java b/data/src/main/java/org/apache/iceberg/data/DeleteFilter.java
index aa5e00fd0ef4..96ee6fd3f5ba 100644
--- a/data/src/main/java/org/apache/iceberg/data/DeleteFilter.java
+++ b/data/src/main/java/org/apache/iceberg/data/DeleteFilter.java
@@ -79,11 +79,11 @@ protected DeleteFilter(
     for (DeleteFile delete : deletes) {
       switch (delete.content()) {
         case POSITION_DELETES:
-          LOG.debug("Adding position delete file {} to filter", delete.path());
+          LOG.debug("Adding position delete file {} to filter", delete.location());
           posDeleteBuilder.add(delete);
           break;
         case EQUALITY_DELETES:
-          LOG.debug("Adding equality delete file {} to filter", delete.path());
+          LOG.debug("Adding equality delete file {} to filter", delete.location());
           eqDeleteBuilder.add(delete);
           break;
         default:
@@ -145,7 +145,7 @@ Accessor<StructLike> posAccessor() {
   protected abstract InputFile getInputFile(String location);
 
   protected InputFile loadInputFile(DeleteFile deleteFile) {
-    return getInputFile(deleteFile.path().toString());
+    return getInputFile(deleteFile.location());
   }
 
   protected long pos(T record) {
diff --git a/data/src/main/java/org/apache/iceberg/data/GenericDeleteFilter.java b/data/src/main/java/org/apache/iceberg/data/GenericDeleteFilter.java
index 0779ed09ce1e..712263e40bc2 100644
--- a/data/src/main/java/org/apache/iceberg/data/GenericDeleteFilter.java
+++ b/data/src/main/java/org/apache/iceberg/data/GenericDeleteFilter.java
@@ -30,7 +30,7 @@ public class GenericDeleteFilter extends DeleteFilter<Record> {
 
   public GenericDeleteFilter(
       FileIO io, FileScanTask task, Schema tableSchema, Schema requestedSchema) {
-    super(task.file().path().toString(), task.deletes(), tableSchema, requestedSchema);
+    super(task.file().location(), task.deletes(), tableSchema, requestedSchema);
     this.io = io;
     this.asStructLike = new InternalRecordWrapper(requiredSchema().asStruct());
   }
diff --git a/data/src/main/java/org/apache/iceberg/data/GenericReader.java b/data/src/main/java/org/apache/iceberg/data/GenericReader.java
index bf2919f334a8..590b01b228ed 100644
--- a/data/src/main/java/org/apache/iceberg/data/GenericReader.java
+++ b/data/src/main/java/org/apache/iceberg/data/GenericReader.java
@@ -92,7 +92,7 @@ private CloseableIterable<Record> applyResidual(
   }
 
   private CloseableIterable<Record> openFile(FileScanTask task, Schema fileProjection) {
-    InputFile input = io.newInputFile(task.file().path().toString());
+    InputFile input = io.newInputFile(task.file().location());
     Map<Integer, ?> partition =
         PartitionUtil.constantsMap(task, IdentityPartitionConverters::convertConstant);
 
@@ -147,7 +147,7 @@ private CloseableIterable<Record> openFile(FileScanTask task, Schema fileProject
       default:
         throw new UnsupportedOperationException(
             String.format(
-                "Cannot read %s file: %s", task.file().format().name(), task.file().path()));
+                "Cannot read %s file: %s", task.file().format().name(), task.file().location()));
     }
   }
 
diff --git a/delta-lake/src/integration/java/org/apache/iceberg/delta/TestSnapshotDeltaLakeTable.java b/delta-lake/src/integration/java/org/apache/iceberg/delta/TestSnapshotDeltaLakeTable.java
index 01a998c65efe..b6b15e766835 100644
--- a/delta-lake/src/integration/java/org/apache/iceberg/delta/TestSnapshotDeltaLakeTable.java
+++ b/delta-lake/src/integration/java/org/apache/iceberg/delta/TestSnapshotDeltaLakeTable.java
@@ -464,8 +464,8 @@ private void checkDataFilePathsIntegrity(
         .addedDataFiles(icebergTable.io())
         .forEach(
             dataFile -> {
-              assertThat(URI.create(dataFile.path().toString()).isAbsolute()).isTrue();
-              assertThat(deltaTableDataFilePaths).contains(dataFile.path().toString());
+              assertThat(URI.create(dataFile.location()).isAbsolute()).isTrue();
+              assertThat(deltaTableDataFilePaths).contains(dataFile.location());
             });
   }
 
diff --git a/delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java b/delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java
index afe43f6bb165..20c6976a4a24 100644
--- a/delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java
+++ b/delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java
@@ -252,7 +252,7 @@ private long commitInitialDeltaSnapshotToIcebergTransaction(
         for (AddFile addFile : initDataFiles) {
           DataFile dataFile = buildDataFileFromAction(addFile, transaction.table());
           filesToAdd.add(dataFile);
-          migratedDataFilesBuilder.add(dataFile.path().toString());
+          migratedDataFilesBuilder.add(dataFile.location());
         }
 
         // AppendFiles case
@@ -309,7 +309,7 @@ private void commitDeltaVersionLogToIcebergTransaction(
         throw new ValidationException(
             "The action %s's is unsupported", action.getClass().getSimpleName());
       }
-      migratedDataFilesBuilder.add(dataFile.path().toString());
+      migratedDataFilesBuilder.add(dataFile.location());
     }
 
     if (!filesToAdd.isEmpty() && !filesToRemove.isEmpty()) {
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java
index 53ce7418f3ec..34bb4afe67f9 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java
@@ -432,7 +432,7 @@ public CloseableIterator<FileInfo> entries(ManifestFileBean manifest) {
     }
 
     static FileInfo toFileInfo(ContentFile<?> file) {
-      return new FileInfo(file.path().toString(), file.content().toString());
+      return new FileInfo(file.location(), file.content().toString());
     }
   }
 }
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java
index bbf65f58e19c..1474ec0e3eef 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RemoveDanglingDeletesSparkAction.java
@@ -90,7 +90,7 @@ Result doExecute() {
     RewriteFiles rewriteFiles = table.newRewrite();
     List<DeleteFile> danglingDeletes = findDanglingDeletes();
     for (DeleteFile deleteFile : danglingDeletes) {
-      LOG.debug("Removing dangling delete file {}", deleteFile.path());
+      LOG.debug("Removing dangling delete file {}", deleteFile.location());
       rewriteFiles.deleteFile(deleteFile);
     }
 
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BaseReader.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BaseReader.java
index 207035bd30ac..f8e8a1f1dd6b 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BaseReader.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BaseReader.java
@@ -150,7 +150,7 @@ public boolean next() throws IOException {
       if (currentTask != null && !currentTask.isDataTask()) {
         String filePaths =
             referencedFiles(currentTask)
-                .map(file -> file.path().toString())
+                .map(ContentFile::location)
                 .collect(Collectors.joining(", "));
         LOG.error("Error reading file(s): {}", filePaths, e);
       }
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BatchDataReader.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BatchDataReader.java
index a2cb74c926c9..f45c152203ee 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BatchDataReader.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BatchDataReader.java
@@ -82,7 +82,7 @@ protected Stream<ContentFile<?>> referencedFiles(FileScanTask task) {
 
   @Override
   protected CloseableIterator<ColumnarBatch> open(FileScanTask task) {
-    String filePath = task.file().path().toString();
+    String filePath = task.file().location();
     LOG.debug("Opening data file {}", filePath);
 
     // update the current file for Spark's filename() function
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/ChangelogRowReader.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/ChangelogRowReader.java
index 25cd9eda6bce..c8e6f5679cd8 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/ChangelogRowReader.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/ChangelogRowReader.java
@@ -110,7 +110,7 @@ private CloseableIterable<InternalRow> openChangelogScanTask(ChangelogScanTask t
   }
 
   CloseableIterable<InternalRow> openAddedRowsScanTask(AddedRowsScanTask task) {
-    String filePath = task.file().path().toString();
+    String filePath = task.file().location();
     SparkDeleteFilter deletes = new SparkDeleteFilter(filePath, task.deletes(), counter(), true);
     return deletes.filter(rows(task, deletes.requiredSchema()));
   }
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/EqualityDeleteRowReader.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/EqualityDeleteRowReader.java
index 7aa5a971562a..ee9449ee13c8 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/EqualityDeleteRowReader.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/EqualityDeleteRowReader.java
@@ -41,7 +41,7 @@ public EqualityDeleteRowReader(
   @Override
   protected CloseableIterator<InternalRow> open(FileScanTask task) {
     SparkDeleteFilter matches =
-        new SparkDeleteFilter(task.file().path().toString(), task.deletes(), counter(), true);
+        new SparkDeleteFilter(task.file().location(), task.deletes(), counter(), true);
 
     // schema or rows returned by readers
     Schema requiredSchema = matches.requiredSchema();
@@ -49,7 +49,7 @@ protected CloseableIterator<InternalRow> open(FileScanTask task) {
     DataFile file = task.file();
 
     // update the current file for Spark's filename() function
-    InputFileBlockHolder.set(file.path().toString(), task.start(), task.length());
+    InputFileBlockHolder.set(file.location(), task.start(), task.length());
 
     return matches.findEqualityDeleteRows(open(task, requiredSchema, idToConstant)).iterator();
   }
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/PositionDeletesRowReader.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/PositionDeletesRowReader.java
index 4b847474153c..1a894df29166 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/PositionDeletesRowReader.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/PositionDeletesRowReader.java
@@ -74,13 +74,13 @@ protected Stream<ContentFile<?>> referencedFiles(PositionDeletesScanTask task) {
 
   @Override
   protected CloseableIterator<InternalRow> open(PositionDeletesScanTask task) {
-    String filePath = task.file().path().toString();
+    String filePath = task.file().location();
     LOG.debug("Opening position delete file {}", filePath);
 
     // update the current file for Spark's filename() function
     InputFileBlockHolder.set(filePath, task.start(), task.length());
 
-    InputFile inputFile = getInputFile(task.file().path().toString());
+    InputFile inputFile = getInputFile(task.file().location());
     Preconditions.checkNotNull(inputFile, "Could not find InputFile associated with %s", task);
 
     // select out constant fields when pushing down filter to row reader
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/RowDataReader.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/RowDataReader.java
index 33b1d6275d6e..f24602fd5583 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/RowDataReader.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/RowDataReader.java
@@ -81,7 +81,7 @@ protected Stream<ContentFile<?>> referencedFiles(FileScanTask task) {
 
   @Override
   protected CloseableIterator<InternalRow> open(FileScanTask task) {
-    String filePath = task.file().path().toString();
+    String filePath = task.file().location();
     LOG.debug("Opening data file {}", filePath);
     SparkDeleteFilter deleteFilter =
         new SparkDeleteFilter(filePath, task.deletes(), counter(), true);
@@ -101,7 +101,7 @@ protected CloseableIterable<InternalRow> open(
     if (task.isDataTask()) {
       return newDataIterable(task.asDataTask(), readSchema);
     } else {
-      InputFile inputFile = getInputFile(task.file().path().toString());
+      InputFile inputFile = getInputFile(task.file().location());
       Preconditions.checkNotNull(
           inputFile, "Could not find InputFile associated with FileScanTask");
       return newIterable(
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCleanupUtil.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCleanupUtil.java
index a103a5003222..5f343128161d 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCleanupUtil.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCleanupUtil.java
@@ -81,7 +81,7 @@ private static String taskInfo() {
    * @param files a list of files to delete
    */
   public static void deleteFiles(String context, FileIO io, List<? extends ContentFile<?>> files) {
-    List<String> paths = Lists.transform(files, file -> file.path().toString());
+    List<String> paths = Lists.transform(files, ContentFile::location);
     deletePaths(context, io, paths);
   }
 
diff --git a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCopyOnWriteScan.java b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCopyOnWriteScan.java
index 5a3963bc614c..7a6025b0731a 100644
--- a/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCopyOnWriteScan.java
+++ b/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkCopyOnWriteScan.java
@@ -130,7 +130,7 @@ public void filter(Filter[] filters) {
           this.filteredLocations = fileLocations;
           List<FileScanTask> filteredTasks =
               tasks().stream()
-                  .filter(file -> fileLocations.contains(file.file().path().toString()))
+                  .filter(file -> fileLocations.contains(file.file().location()))
                   .collect(Collectors.toList());
 
           LOG.info(


Test patch:
diff --git a/api/src/test/java/org/apache/iceberg/TestHelpers.java b/api/src/test/java/org/apache/iceberg/TestHelpers.java
index 003e7835ed4b..cf1dc203f4d6 100644
--- a/api/src/test/java/org/apache/iceberg/TestHelpers.java
+++ b/api/src/test/java/org/apache/iceberg/TestHelpers.java
@@ -649,7 +649,7 @@ public CharSequence path() {
 
     @Override
     public FileFormat format() {
-      return FileFormat.fromFileName(path());
+      return FileFormat.fromFileName(location());
     }
 
     @Override
diff --git a/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java b/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java
index f7c287f1dc04..7f7d33a7b54d 100644
--- a/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java
+++ b/core/src/test/java/org/apache/iceberg/ScanPlanningAndReportingTestBase.java
@@ -282,7 +282,7 @@ public void scanningWithSkippedDeleteFiles() throws IOException {
     }
     assertThat(fileTasks)
         .singleElement()
-        .satisfies(task -> assertThat(task.file().path()).isEqualTo(FILE_D.path()));
+        .satisfies(task -> assertThat(task.file().location()).isEqualTo(FILE_D.location()));
 
     ScanReport scanReport = reporter.lastReport();
     assertThat(scanReport).isNotNull();
diff --git a/core/src/test/java/org/apache/iceberg/TestSnapshot.java b/core/src/test/java/org/apache/iceberg/TestSnapshot.java
index bbe5e8f6cdd8..59217e5b91c8 100644
--- a/core/src/test/java/org/apache/iceberg/TestSnapshot.java
+++ b/core/src/test/java/org/apache/iceberg/TestSnapshot.java
@@ -99,7 +99,7 @@ public void testCachedDataFiles() {
     assertThat(removedDataFiles).as("Must have 1 removed data file").hasSize(1);
 
     DataFile removedDataFile = Iterables.getOnlyElement(removedDataFiles);
-    assertThat(removedDataFile.path()).isEqualTo(FILE_A.path());
+    assertThat(removedDataFile.location()).isEqualTo(FILE_A.location());
     assertThat(removedDataFile.specId()).isEqualTo(FILE_A.specId());
     assertThat(removedDataFile.partition()).isEqualTo(FILE_A.partition());
 
@@ -107,7 +107,7 @@ public void testCachedDataFiles() {
     assertThat(addedDataFiles).as("Must have 1 added data file").hasSize(1);
 
     DataFile addedDataFile = Iterables.getOnlyElement(addedDataFiles);
-    assertThat(addedDataFile.path()).isEqualTo(thirdSnapshotDataFile.path());
+    assertThat(addedDataFile.location()).isEqualTo(thirdSnapshotDataFile.location());
     assertThat(addedDataFile.specId()).isEqualTo(thirdSnapshotDataFile.specId());
     assertThat(addedDataFile.partition()).isEqualTo(thirdSnapshotDataFile.partition());
   }
@@ -147,7 +147,7 @@ public void testCachedDeleteFiles() {
     assertThat(removedDeleteFiles).as("Must have 1 removed delete file").hasSize(1);
 
     DeleteFile removedDeleteFile = Iterables.getOnlyElement(removedDeleteFiles);
-    assertThat(removedDeleteFile.path()).isEqualTo(secondSnapshotDeleteFile.path());
+    assertThat(removedDeleteFile.location()).isEqualTo(secondSnapshotDeleteFile.location());
     assertThat(removedDeleteFile.specId()).isEqualTo(secondSnapshotDeleteFile.specId());
     assertThat(removedDeleteFile.partition()).isEqualTo(secondSnapshotDeleteFile.partition());
 
@@ -155,7 +155,7 @@ public void testCachedDeleteFiles() {
     assertThat(addedDeleteFiles).as("Must have 1 added delete file").hasSize(1);
 
     DeleteFile addedDeleteFile = Iterables.getOnlyElement(addedDeleteFiles);
-    assertThat(addedDeleteFile.path()).isEqualTo(thirdSnapshotDeleteFile.path());
+    assertThat(addedDeleteFile.location()).isEqualTo(thirdSnapshotDeleteFile.location());
     assertThat(addedDeleteFile.specId()).isEqualTo(thirdSnapshotDeleteFile.specId());
     assertThat(addedDeleteFile.partition()).isEqualTo(thirdSnapshotDeleteFile.partition());
   }
diff --git a/core/src/test/java/org/apache/iceberg/TestTransaction.java b/core/src/test/java/org/apache/iceberg/TestTransaction.java
index 8770e24f8e40..2042906c15c6 100644
--- a/core/src/test/java/org/apache/iceberg/TestTransaction.java
+++ b/core/src/test/java/org/apache/iceberg/TestTransaction.java
@@ -702,14 +702,9 @@ public void testTransactionRecommit() {
 
     Set<String> paths =
         Sets.newHashSet(
-            Iterables.transform(
-                table.newScan().planFiles(), task -> task.file().path().toString()));
+            Iterables.transform(table.newScan().planFiles(), task -> task.file().location()));
     Set<String> expectedPaths =
-        Sets.newHashSet(
-            FILE_A.path().toString(),
-            FILE_B.path().toString(),
-            FILE_C.path().toString(),
-            FILE_D.path().toString());
+        Sets.newHashSet(FILE_A.location(), FILE_B.location(), FILE_C.location(), FILE_D.location());
 
     assertThat(paths).isEqualTo(expectedPaths);
     assertThat(table.currentSnapshot().allManifests(table.io())).hasSize(2);
diff --git a/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java b/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
index 75983402a38c..a011578865b4 100644
--- a/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
+++ b/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
@@ -2729,12 +2729,13 @@ public void assertFiles(Table table, DataFile... files) {
       List<CharSequence> paths =
           Streams.stream(tasks)
               .map(FileScanTask::file)
-              .map(DataFile::path)
+              .map(DataFile::location)
               .collect(Collectors.toList());
       assertThat(paths).as("Should contain expected number of data files").hasSize(files.length);
       assertThat(CharSequenceSet.of(paths))
           .as("Should contain correct file paths")
-          .isEqualTo(CharSequenceSet.of(Iterables.transform(Arrays.asList(files), DataFile::path)));
+          .isEqualTo(
+              CharSequenceSet.of(Iterables.transform(Arrays.asList(files), DataFile::location)));
     } catch (IOException e) {
       throw new UncheckedIOException(e);
     }
diff --git a/data/src/test/java/org/apache/iceberg/data/DeleteReadTests.java b/data/src/test/java/org/apache/iceberg/data/DeleteReadTests.java
index ada9e27a2fbe..7c2621494288 100644
--- a/data/src/test/java/org/apache/iceberg/data/DeleteReadTests.java
+++ b/data/src/test/java/org/apache/iceberg/data/DeleteReadTests.java
@@ -379,9 +379,9 @@ public void testEqualityDeletesSpanningMultipleDataFiles() throws IOException {
   public void testPositionDeletes() throws IOException {
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 0L), // id = 29
-            Pair.of(dataFile.path(), 3L), // id = 89
-            Pair.of(dataFile.path(), 6L) // id = 122
+            Pair.of(dataFile.location(), 0L), // id = 29
+            Pair.of(dataFile.location(), 3L), // id = 89
+            Pair.of(dataFile.location(), 6L) // id = 122
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
@@ -413,8 +413,8 @@ public void testMultiplePosDeleteFiles() throws IOException {
 
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 0L), // id = 29
-            Pair.of(dataFile.path(), 3L) // id = 89
+            Pair.of(dataFile.location(), 0L), // id = 29
+            Pair.of(dataFile.location(), 3L) // id = 89
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
@@ -431,7 +431,7 @@ public void testMultiplePosDeleteFiles() throws IOException {
         .validateDataFilesExist(posDeletes.second())
         .commit();
 
-    deletes = Lists.newArrayList(Pair.of(dataFile.path(), 6L)); // id = 122
+    deletes = Lists.newArrayList(Pair.of(dataFile.location(), 6L)); // id = 122
 
     posDeletes =
         FileHelpers.writeDeleteFile(
@@ -475,8 +475,8 @@ public void testMixedPositionAndEqualityDeletes() throws IOException {
 
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 3L), // id = 89
-            Pair.of(dataFile.path(), 5L) // id = 121
+            Pair.of(dataFile.location(), 3L), // id = 89
+            Pair.of(dataFile.location(), 5L) // id = 121
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
diff --git a/data/src/test/java/org/apache/iceberg/data/TestDataFileIndexStatsFilters.java b/data/src/test/java/org/apache/iceberg/data/TestDataFileIndexStatsFilters.java
index 0c97d9ecd4da..2cbf2ad4d1f0 100644
--- a/data/src/test/java/org/apache/iceberg/data/TestDataFileIndexStatsFilters.java
+++ b/data/src/test/java/org/apache/iceberg/data/TestDataFileIndexStatsFilters.java
@@ -116,12 +116,12 @@ public void dropTable() {
   }
 
   @Test
-  public void testPositionDeletePlanningPath() throws IOException {
+  public void testPositionDeletePlanninglocation() throws IOException {
     table.newAppend().appendFile(dataFile).commit();
 
     List<Pair<CharSequence, Long>> deletes = Lists.newArrayList();
-    deletes.add(Pair.of(dataFile.path(), 0L));
-    deletes.add(Pair.of(dataFile.path(), 1L));
+    deletes.add(Pair.of(dataFile.location(), 0L));
+    deletes.add(Pair.of(dataFile.location(), 1L));
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
         FileHelpers.writeDeleteFile(table, Files.localOutput(createTempFile()), deletes);
@@ -383,7 +383,7 @@ public void testDifferentDeleteTypes() throws IOException {
         writePosDeletes(
             evenPartition,
             ImmutableList.of(
-                Pair.of(dataFileWithEvenRecords.path(), 0L),
+                Pair.of(dataFileWithEvenRecords.location(), 0L),
                 Pair.of("some-other-file.parquet", 0L)));
     table
         .newRowDelta()
@@ -396,8 +396,8 @@ public void testDifferentDeleteTypes() throws IOException {
         writePosDeletes(
             evenPartition,
             ImmutableList.of(
-                Pair.of(dataFileWithEvenRecords.path(), 1L),
-                Pair.of(dataFileWithEvenRecords.path(), 2L)));
+                Pair.of(dataFileWithEvenRecords.location(), 1L),
+                Pair.of(dataFileWithEvenRecords.location(), 2L)));
     table
         .newRowDelta()
         .addDeletes(pathPosDeletes.first())
@@ -437,7 +437,7 @@ public void testDifferentDeleteTypes() throws IOException {
   }
 
   private boolean coversDataFile(FileScanTask task, DataFile file) {
-    return task.file().path().toString().equals(file.path().toString());
+    return task.file().location().toString().equals(file.location().toString());
   }
 
   private void assertDeletes(FileScanTask task, DeleteFile... expectedDeleteFiles) {
@@ -446,7 +446,7 @@ private void assertDeletes(FileScanTask task, DeleteFile... expectedDeleteFiles)
     assertThat(actualDeletePaths.size()).isEqualTo(expectedDeleteFiles.length);
 
     for (DeleteFile expectedDeleteFile : expectedDeleteFiles) {
-      assertThat(actualDeletePaths.contains(expectedDeleteFile.path())).isTrue();
+      assertThat(actualDeletePaths.contains(expectedDeleteFile.location())).isTrue();
     }
   }
 
diff --git a/data/src/test/java/org/apache/iceberg/io/TestAppenderFactory.java b/data/src/test/java/org/apache/iceberg/io/TestAppenderFactory.java
index f3f25ff317f6..83f1bf261063 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestAppenderFactory.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestAppenderFactory.java
@@ -219,9 +219,9 @@ public void testPosDeleteWriter() throws IOException {
 
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 0L),
-            Pair.of(dataFile.path(), 2L),
-            Pair.of(dataFile.path(), 4L));
+            Pair.of(dataFile.location(), 0L),
+            Pair.of(dataFile.location(), 2L),
+            Pair.of(dataFile.location(), 4L));
 
     EncryptedOutputFile out = createEncryptedOutputFile();
     PositionDeleteWriter<T> eqDeleteWriter =
@@ -238,9 +238,9 @@ public void testPosDeleteWriter() throws IOException {
     GenericRecord gRecord = GenericRecord.create(pathPosSchema);
     Set<Record> expectedDeletes =
         Sets.newHashSet(
-            gRecord.copy("file_path", dataFile.path(), "pos", 0L),
-            gRecord.copy("file_path", dataFile.path(), "pos", 2L),
-            gRecord.copy("file_path", dataFile.path(), "pos", 4L));
+            gRecord.copy("file_path", dataFile.location(), "pos", 0L),
+            gRecord.copy("file_path", dataFile.location(), "pos", 2L),
+            gRecord.copy("file_path", dataFile.location(), "pos", 4L));
     assertThat(
             Sets.newHashSet(createReader(pathPosSchema, out.encryptingOutputFile().toInputFile())))
         .isEqualTo(expectedDeletes);
@@ -268,9 +268,9 @@ public void testPosDeleteWriterWithRowSchema() throws IOException {
 
     List<PositionDelete<T>> deletes =
         Lists.newArrayList(
-            positionDelete(dataFile.path(), 0, rowSet.get(0)),
-            positionDelete(dataFile.path(), 2, rowSet.get(2)),
-            positionDelete(dataFile.path(), 4, rowSet.get(4)));
+            positionDelete(dataFile.location(), 0, rowSet.get(0)),
+            positionDelete(dataFile.location(), 2, rowSet.get(2)),
+            positionDelete(dataFile.location(), 4, rowSet.get(4)));
 
     EncryptedOutputFile out = createEncryptedOutputFile();
     PositionDeleteWriter<T> eqDeleteWriter =
@@ -290,21 +290,21 @@ public void testPosDeleteWriterWithRowSchema() throws IOException {
         Sets.newHashSet(
             gRecord.copy(
                 "file_path",
-                dataFile.path(),
+                dataFile.location(),
                 "pos",
                 0L,
                 "row",
                 rowRecord.copy("id", 1, "data", "aaa")),
             gRecord.copy(
                 "file_path",
-                dataFile.path(),
+                dataFile.location(),
                 "pos",
                 2L,
                 "row",
                 rowRecord.copy("id", 3, "data", "ccc")),
             gRecord.copy(
                 "file_path",
-                dataFile.path(),
+                dataFile.location(),
                 "pos",
                 4L,
                 "row",
diff --git a/data/src/test/java/org/apache/iceberg/io/TestFileWriterFactory.java b/data/src/test/java/org/apache/iceberg/io/TestFileWriterFactory.java
index a0980b650b3b..0acb173f0923 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestFileWriterFactory.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestFileWriterFactory.java
@@ -144,7 +144,7 @@ public void testEqualityDeleteWriter() throws IOException {
     List<Record> expectedDeletes =
         ImmutableList.of(
             deleteRecord.copy("id", 1), deleteRecord.copy("id", 3), deleteRecord.copy("id", 5));
-    InputFile inputDeleteFile = table.io().newInputFile(deleteFile.path().toString());
+    InputFile inputDeleteFile = table.io().newInputFile(deleteFile.location());
     List<Record> actualDeletes = readFile(equalityDeleteRowSchema, inputDeleteFile);
     assertThat(actualDeletes).isEqualTo(expectedDeletes);
 
@@ -222,9 +222,9 @@ public void testPositionDeleteWriter() throws IOException {
     // write a position delete file
     List<PositionDelete<T>> deletes =
         ImmutableList.of(
-            positionDelete(dataFile.path(), 0L, null),
-            positionDelete(dataFile.path(), 2L, null),
-            positionDelete(dataFile.path(), 4L, null));
+            positionDelete(dataFile.location(), 0L, null),
+            positionDelete(dataFile.location(), 2L, null),
+            positionDelete(dataFile.location(), 4L, null));
     Pair<DeleteFile, CharSequenceSet> result =
         writePositionDeletes(writerFactory, deletes, table.spec(), partition);
     DeleteFile deleteFile = result.first();
@@ -249,11 +249,13 @@ public void testPositionDeleteWriter() throws IOException {
     GenericRecord deleteRecord = GenericRecord.create(DeleteSchemaUtil.pathPosSchema());
     List<Record> expectedDeletes =
         ImmutableList.of(
-            deleteRecord.copy(DELETE_FILE_PATH.name(), dataFile.path(), DELETE_FILE_POS.name(), 0L),
-            deleteRecord.copy(DELETE_FILE_PATH.name(), dataFile.path(), DELETE_FILE_POS.name(), 2L),
             deleteRecord.copy(
-                DELETE_FILE_PATH.name(), dataFile.path(), DELETE_FILE_POS.name(), 4L));
-    InputFile inputDeleteFile = table.io().newInputFile(deleteFile.path().toString());
+                DELETE_FILE_PATH.name(), dataFile.location(), DELETE_FILE_POS.name(), 0L),
+            deleteRecord.copy(
+                DELETE_FILE_PATH.name(), dataFile.location(), DELETE_FILE_POS.name(), 2L),
+            deleteRecord.copy(
+                DELETE_FILE_PATH.name(), dataFile.location(), DELETE_FILE_POS.name(), 4L));
+    InputFile inputDeleteFile = table.io().newInputFile(deleteFile.location());
     List<Record> actualDeletes = readFile(DeleteSchemaUtil.pathPosSchema(), inputDeleteFile);
     assertThat(actualDeletes).isEqualTo(expectedDeletes);
 
@@ -280,7 +282,7 @@ public void testPositionDeleteWriterWithRow() throws IOException {
 
     // write a position delete file and persist the deleted row
     List<PositionDelete<T>> deletes =
-        ImmutableList.of(positionDelete(dataFile.path(), 0, dataRows.get(0)));
+        ImmutableList.of(positionDelete(dataFile.location(), 0, dataRows.get(0)));
     Pair<DeleteFile, CharSequenceSet> result =
         writePositionDeletes(writerFactory, deletes, table.spec(), partition);
     DeleteFile deleteFile = result.first();
@@ -323,13 +325,13 @@ public void testPositionDeleteWriterWithRow() throws IOException {
     Map<String, Object> deleteRecordColumns =
         ImmutableMap.of(
             DELETE_FILE_PATH.name(),
-            dataFile.path(),
+            dataFile.location(),
             DELETE_FILE_POS.name(),
             0L,
             DELETE_FILE_ROW_FIELD_NAME,
             deletedRow.copy("id", 1, "data", "aaa"));
     List<Record> expectedDeletes = ImmutableList.of(deleteRecord.copy(deleteRecordColumns));
-    InputFile inputDeleteFile = table.io().newInputFile(deleteFile.path().toString());
+    InputFile inputDeleteFile = table.io().newInputFile(deleteFile.location());
     List<Record> actualDeletes = readFile(positionDeleteSchema, inputDeleteFile);
     assertThat(actualDeletes).isEqualTo(expectedDeletes);
 
@@ -359,9 +361,9 @@ public void testPositionDeleteWriterMultipleDataFiles() throws IOException {
     // write a position delete file referencing both
     List<PositionDelete<T>> deletes =
         ImmutableList.of(
-            positionDelete(dataFile1.path(), 0L, null),
-            positionDelete(dataFile1.path(), 2L, null),
-            positionDelete(dataFile2.path(), 4L, null));
+            positionDelete(dataFile1.location(), 0L, null),
+            positionDelete(dataFile1.location(), 2L, null),
+            positionDelete(dataFile2.location(), 4L, null));
     Pair<DeleteFile, CharSequenceSet> result =
         writePositionDeletes(writerFactory, deletes, table.spec(), partition);
     DeleteFile deleteFile = result.first();
diff --git a/data/src/test/java/org/apache/iceberg/io/TestGenericSortedPosDeleteWriter.java b/data/src/test/java/org/apache/iceberg/io/TestGenericSortedPosDeleteWriter.java
index 5718eb37030d..629df03e37cd 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestGenericSortedPosDeleteWriter.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestGenericSortedPosDeleteWriter.java
@@ -137,7 +137,7 @@ public void testSortedPosDelete() throws IOException {
         new SortedPosDeleteWriter<>(appenderFactory, fileFactory, format, null, 100);
     try (SortedPosDeleteWriter<Record> closeableWriter = writer) {
       for (int index = rowSet.size() - 1; index >= 0; index -= 2) {
-        closeableWriter.delete(dataFile.path(), index);
+        closeableWriter.delete(dataFile.location(), index);
       }
     }
 
@@ -150,10 +150,10 @@ public void testSortedPosDelete() throws IOException {
     Record record = GenericRecord.create(pathPosSchema);
     List<Record> expectedDeletes =
         Lists.newArrayList(
-            record.copy("file_path", dataFile.path(), "pos", 0L),
-            record.copy("file_path", dataFile.path(), "pos", 2L),
-            record.copy("file_path", dataFile.path(), "pos", 4L));
-    assertThat(readRecordsAsList(pathPosSchema, deleteFile.path())).isEqualTo(expectedDeletes);
+            record.copy("file_path", dataFile.location(), "pos", 0L),
+            record.copy("file_path", dataFile.location(), "pos", 2L),
+            record.copy("file_path", dataFile.location(), "pos", 4L));
+    assertThat(readRecordsAsList(pathPosSchema, deleteFile.location())).isEqualTo(expectedDeletes);
 
     table
         .newRowDelta()
@@ -181,7 +181,7 @@ public void testSortedPosDeleteWithSchemaAndNullRow() throws IOException {
     assertThatThrownBy(
             () ->
                 new SortedPosDeleteWriter<>(appenderFactory, fileFactory, format, null, 1)
-                    .delete(dataFile.path(), 0L))
+                    .delete(dataFile.location(), 0L))
         .isInstanceOf(Exception.class);
   }
 
@@ -204,7 +204,7 @@ public void testSortedPosDeleteWithRow() throws IOException {
     try (SortedPosDeleteWriter<Record> closeableWriter = writer) {
       for (int index = rowSet.size() - 1; index >= 0; index -= 2) {
         closeableWriter.delete(
-            dataFile.path(), index, rowSet.get(index)); // Write deletes with row.
+            dataFile.location(), index, rowSet.get(index)); // Write deletes with row.
       }
     }
 
@@ -217,10 +217,10 @@ public void testSortedPosDeleteWithRow() throws IOException {
     Record record = GenericRecord.create(pathPosSchema);
     List<Record> expectedDeletes =
         Lists.newArrayList(
-            record.copy("file_path", dataFile.path(), "pos", 0L, "row", createRow(0, "aaa")),
-            record.copy("file_path", dataFile.path(), "pos", 2L, "row", createRow(2, "ccc")),
-            record.copy("file_path", dataFile.path(), "pos", 4L, "row", createRow(4, "eee")));
-    assertThat(readRecordsAsList(pathPosSchema, deleteFile.path())).isEqualTo(expectedDeletes);
+            record.copy("file_path", dataFile.location(), "pos", 0L, "row", createRow(0, "aaa")),
+            record.copy("file_path", dataFile.location(), "pos", 2L, "row", createRow(2, "ccc")),
+            record.copy("file_path", dataFile.location(), "pos", 4L, "row", createRow(4, "eee")));
+    assertThat(readRecordsAsList(pathPosSchema, deleteFile.location())).isEqualTo(expectedDeletes);
 
     table
         .newRowDelta()
@@ -267,7 +267,7 @@ public void testMultipleFlush() throws IOException {
     try (SortedPosDeleteWriter<Record> closeableWriter = writer) {
       for (int pos = 0; pos < 100; pos++) {
         for (int fileIndex = 4; fileIndex >= 0; fileIndex--) {
-          closeableWriter.delete(dataFiles.get(fileIndex).path(), pos);
+          closeableWriter.delete(dataFiles.get(fileIndex).location(), pos);
         }
       }
     }
@@ -282,12 +282,13 @@ public void testMultipleFlush() throws IOException {
       for (int dataFileIndex = 0; dataFileIndex < 5; dataFileIndex++) {
         DataFile dataFile = dataFiles.get(dataFileIndex);
         for (long pos = deleteFileIndex * 10; pos < deleteFileIndex * 10 + 10; pos++) {
-          expectedDeletes.add(record.copy("file_path", dataFile.path(), "pos", pos));
+          expectedDeletes.add(record.copy("file_path", dataFile.location(), "pos", pos));
         }
       }
 
       DeleteFile deleteFile = deleteFiles.get(deleteFileIndex);
-      assertThat(readRecordsAsList(pathPosSchema, deleteFile.path())).isEqualTo(expectedDeletes);
+      assertThat(readRecordsAsList(pathPosSchema, deleteFile.location()))
+          .isEqualTo(expectedDeletes);
     }
 
     rowDelta = table.newRowDelta();
diff --git a/data/src/test/java/org/apache/iceberg/io/TestPartitioningWriters.java b/data/src/test/java/org/apache/iceberg/io/TestPartitioningWriters.java
index 9813fb0caba2..e404b7008834 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestPartitioningWriters.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestPartitioningWriters.java
@@ -362,14 +362,18 @@ private void checkClusteredPositionDeleteWriterMultipleSpecs(DeleteGranularity d
     PartitionSpec bucketSpec = table.specs().get(1);
     PartitionSpec identitySpec = table.specs().get(2);
 
-    writer.write(positionDelete(dataFile1.path(), 0L, null), unpartitionedSpec, null);
-    writer.write(positionDelete(dataFile1.path(), 1L, null), unpartitionedSpec, null);
+    writer.write(positionDelete(dataFile1.location(), 0L, null), unpartitionedSpec, null);
+    writer.write(positionDelete(dataFile1.location(), 1L, null), unpartitionedSpec, null);
     writer.write(
-        positionDelete(dataFile2.path(), 0L, null), bucketSpec, partitionKey(bucketSpec, "bbb"));
+        positionDelete(dataFile2.location(), 0L, null),
+        bucketSpec,
+        partitionKey(bucketSpec, "bbb"));
     writer.write(
-        positionDelete(dataFile2.path(), 1L, null), bucketSpec, partitionKey(bucketSpec, "bbb"));
+        positionDelete(dataFile2.location(), 1L, null),
+        bucketSpec,
+        partitionKey(bucketSpec, "bbb"));
     writer.write(
-        positionDelete(dataFile3.path(), 0L, null),
+        positionDelete(dataFile3.location(), 0L, null),
         identitySpec,
         partitionKey(identitySpec, "ccc"));
 
@@ -488,10 +492,10 @@ private void checkClusteredPositionDeleteWriterGranularity(DeleteGranularity del
     PartitionSpec spec = table.spec();
 
     // write deletes for both data files
-    writer.write(positionDelete(dataFile1.path(), 0L, null), spec, null);
-    writer.write(positionDelete(dataFile1.path(), 1L, null), spec, null);
-    writer.write(positionDelete(dataFile2.path(), 0L, null), spec, null);
-    writer.write(positionDelete(dataFile2.path(), 1L, null), spec, null);
+    writer.write(positionDelete(dataFile1.location(), 0L, null), spec, null);
+    writer.write(positionDelete(dataFile1.location(), 1L, null), spec, null);
+    writer.write(positionDelete(dataFile2.location(), 0L, null), spec, null);
+    writer.write(positionDelete(dataFile2.location(), 1L, null), spec, null);
     writer.close();
 
     // verify the writer result
@@ -636,25 +640,29 @@ private void checkFanoutPositionOnlyDeleteWriterOutOfOrderRecords(
     PartitionSpec bucketSpec = table.specs().get(1);
     PartitionSpec identitySpec = table.specs().get(2);
 
-    writer.write(positionDelete(dataFile1.path(), 1L, null), unpartitionedSpec, null);
+    writer.write(positionDelete(dataFile1.location(), 1L, null), unpartitionedSpec, null);
     writer.write(
-        positionDelete(dataFile2.path(), 1L, null), bucketSpec, partitionKey(bucketSpec, "bbb"));
+        positionDelete(dataFile2.location(), 1L, null),
+        bucketSpec,
+        partitionKey(bucketSpec, "bbb"));
     writer.write(
-        positionDelete(dataFile2.path(), 0L, null), bucketSpec, partitionKey(bucketSpec, "bbb"));
+        positionDelete(dataFile2.location(), 0L, null),
+        bucketSpec,
+        partitionKey(bucketSpec, "bbb"));
     writer.write(
-        positionDelete(dataFile3.path(), 1L, null),
+        positionDelete(dataFile3.location(), 1L, null),
         identitySpec,
         partitionKey(identitySpec, "ccc"));
     writer.write(
-        positionDelete(dataFile3.path(), 2L, null),
+        positionDelete(dataFile3.location(), 2L, null),
         identitySpec,
         partitionKey(identitySpec, "ccc"));
-    writer.write(positionDelete(dataFile1.path(), 0L, null), unpartitionedSpec, null);
+    writer.write(positionDelete(dataFile1.location(), 0L, null), unpartitionedSpec, null);
     writer.write(
-        positionDelete(dataFile3.path(), 0L, null),
+        positionDelete(dataFile3.location(), 0L, null),
         identitySpec,
         partitionKey(identitySpec, "ccc"));
-    writer.write(positionDelete(dataFile1.path(), 2L, null), unpartitionedSpec, null);
+    writer.write(positionDelete(dataFile1.location(), 2L, null), unpartitionedSpec, null);
 
     writer.close();
 
@@ -703,10 +711,10 @@ private void checkFanoutPositionOnlyDeleteWriterGranularity(DeleteGranularity de
     PartitionSpec spec = table.spec();
 
     // write deletes for both data files (the order of records is mixed)
-    writer.write(positionDelete(dataFile1.path(), 1L, null), spec, null);
-    writer.write(positionDelete(dataFile2.path(), 0L, null), spec, null);
-    writer.write(positionDelete(dataFile1.path(), 0L, null), spec, null);
-    writer.write(positionDelete(dataFile2.path(), 1L, null), spec, null);
+    writer.write(positionDelete(dataFile1.location(), 1L, null), spec, null);
+    writer.write(positionDelete(dataFile2.location(), 0L, null), spec, null);
+    writer.write(positionDelete(dataFile1.location(), 0L, null), spec, null);
+    writer.write(positionDelete(dataFile2.location(), 1L, null), spec, null);
     writer.close();
 
     // verify the writer result
@@ -750,8 +758,8 @@ public void testRewriteOfPreviousDeletes() throws IOException {
             writerFactory, fileFactory, table.io(), TARGET_FILE_SIZE, DeleteGranularity.FILE);
 
     // write initial deletes for both data files
-    writer1.write(positionDelete(dataFile1.path(), 1L), spec, null);
-    writer1.write(positionDelete(dataFile2.path(), 1L), spec, null);
+    writer1.write(positionDelete(dataFile1.location(), 1L), spec, null);
+    writer1.write(positionDelete(dataFile2.location(), 1L), spec, null);
     writer1.close();
 
     // verify the writer result
@@ -789,8 +797,8 @@ public void testRewriteOfPreviousDeletes() throws IOException {
             new PreviousDeleteLoader(table, previousDeletes));
 
     // write more deletes for both data files
-    writer2.write(positionDelete(dataFile1.path(), 0L), spec, null);
-    writer2.write(positionDelete(dataFile2.path(), 0L), spec, null);
+    writer2.write(positionDelete(dataFile1.location(), 0L), spec, null);
+    writer2.write(positionDelete(dataFile2.location(), 0L), spec, null);
     writer2.close();
 
     // verify the writer result
diff --git a/data/src/test/java/org/apache/iceberg/io/TestPositionDeltaWriters.java b/data/src/test/java/org/apache/iceberg/io/TestPositionDeltaWriters.java
index 1e5863e8bff9..a4122d593c28 100644
--- a/data/src/test/java/org/apache/iceberg/io/TestPositionDeltaWriters.java
+++ b/data/src/test/java/org/apache/iceberg/io/TestPositionDeltaWriters.java
@@ -164,8 +164,9 @@ public void testPositionDeltaDeleteOnly() throws IOException {
     PositionDeltaWriter<T> deltaWriter =
         new BasePositionDeltaWriter<>(insertWriter, updateWriter, deleteWriter);
 
-    deltaWriter.delete(dataFile1.path(), 2L, unpartitionedSpec, null);
-    deltaWriter.delete(dataFile2.path(), 1L, partitionedSpec, partitionKey(partitionedSpec, "bbb"));
+    deltaWriter.delete(dataFile1.location(), 2L, unpartitionedSpec, null);
+    deltaWriter.delete(
+        dataFile2.location(), 1L, partitionedSpec, partitionKey(partitionedSpec, "bbb"));
 
     deltaWriter.close();
 
@@ -219,8 +220,9 @@ public void testPositionDeltaMultipleSpecs() throws IOException {
     PositionDeltaWriter<T> deltaWriter =
         new BasePositionDeltaWriter<>(insertWriter, updateWriter, deleteWriter);
 
-    deltaWriter.delete(dataFile1.path(), 2L, unpartitionedSpec, null);
-    deltaWriter.delete(dataFile2.path(), 1L, partitionedSpec, partitionKey(partitionedSpec, "bbb"));
+    deltaWriter.delete(dataFile1.location(), 2L, unpartitionedSpec, null);
+    deltaWriter.delete(
+        dataFile2.location(), 1L, partitionedSpec, partitionKey(partitionedSpec, "bbb"));
     deltaWriter.insert(toRow(10, "ccc"), partitionedSpec, partitionKey(partitionedSpec, "ccc"));
 
     deltaWriter.close();
diff --git a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestExpireSnapshotsProcedure.java b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestExpireSnapshotsProcedure.java
index 0f24c5613f17..34fec09add7c 100644
--- a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestExpireSnapshotsProcedure.java
+++ b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestExpireSnapshotsProcedure.java
@@ -283,7 +283,7 @@ public void testExpireDeleteFiles() throws Exception {
     assertThat(TestHelpers.deleteFiles(table)).as("Should have 1 delete file").hasSize(1);
     Path deleteManifestPath = new Path(TestHelpers.deleteManifests(table).iterator().next().path());
     Path deleteFilePath =
-        new Path(String.valueOf(TestHelpers.deleteFiles(table).iterator().next().path()));
+        new Path(String.valueOf(TestHelpers.deleteFiles(table).iterator().next().location()));
 
     sql(
         "CALL %s.system.rewrite_data_files("
diff --git a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRemoveOrphanFilesProcedure.java b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRemoveOrphanFilesProcedure.java
index d8feaa77079b..0928cde7ca66 100644
--- a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRemoveOrphanFilesProcedure.java
+++ b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRemoveOrphanFilesProcedure.java
@@ -412,7 +412,7 @@ public void testRemoveOrphanFilesWithDeleteFiles() throws Exception {
     assertThat(TestHelpers.deleteFiles(table)).as("Should have 1 delete file").hasSize(1);
     Path deleteManifestPath = new Path(TestHelpers.deleteManifests(table).iterator().next().path());
     Path deleteFilePath =
-        new Path(String.valueOf(TestHelpers.deleteFiles(table).iterator().next().path()));
+        new Path(String.valueOf(TestHelpers.deleteFiles(table).iterator().next().location()));
 
     // wait to ensure files are old enough
     waitUntilAfter(System.currentTimeMillis());
diff --git a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java
index f7329e841800..f3be0a870972 100644
--- a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java
+++ b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java
@@ -305,7 +305,7 @@ private void writePosDeletesForFiles(Table table, List<DataFile> files) throws I
       List<Pair<CharSequence, Long>> deletes = Lists.newArrayList();
       for (DataFile partitionFile : partitionFiles) {
         for (int deletePos = 0; deletePos < DELETE_FILE_SIZE; deletePos++) {
-          deletes.add(Pair.of(partitionFile.path(), (long) deletePos));
+          deletes.add(Pair.of(partitionFile.location(), (long) deletePos));
           counter++;
           if (counter == deleteFileSize) {
             // Dump to file and reset variables
diff --git a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestUpdate.java b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestUpdate.java
index 09aa51f0460a..550bf41ce220 100644
--- a/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestUpdate.java
+++ b/spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestUpdate.java
@@ -1299,7 +1299,7 @@ public void testUpdateWithStaticPredicatePushdown() {
 
     // remove the data file from the 'hr' partition to ensure it is not scanned
     DataFile dataFile = Iterables.getOnlyElement(snapshot.addedDataFiles(table.io()));
-    table.io().deleteFile(dataFile.path().toString());
+    table.io().deleteFile(dataFile.location());
 
     // disable dynamic pruning and rely only on static predicate pushdown
     withSQLConf(
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/TaskCheckHelper.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/TaskCheckHelper.java
index 668f410091dd..bcd00eb6f4e5 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/TaskCheckHelper.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/TaskCheckHelper.java
@@ -62,9 +62,9 @@ public static void assertEquals(FileScanTask expected, FileScanTask actual) {
   }
 
   public static void assertEquals(DataFile expected, DataFile actual) {
-    assertThat(actual.path())
+    assertThat(actual.location())
         .as("Should match the serialized record path")
-        .isEqualTo(expected.path());
+        .isEqualTo(expected.location());
     assertThat(actual.format())
         .as("Should match the serialized record format")
         .isEqualTo(expected.format());
@@ -104,7 +104,7 @@ private static List<FileScanTask> getFileScanTasksInFilePathOrder(
       ScanTaskGroup<FileScanTask> taskGroup) {
     return taskGroup.tasks().stream()
         // use file path + start position to differentiate the tasks
-        .sorted(Comparator.comparing(o -> o.file().path().toString() + "##" + o.start()))
+        .sorted(Comparator.comparing(o -> o.file().location() + "##" + o.start()))
         .collect(Collectors.toList());
   }
 }
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/ValidationHelpers.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/ValidationHelpers.java
index b0b3085dca70..7314043b15e2 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/ValidationHelpers.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/ValidationHelpers.java
@@ -42,7 +42,7 @@ public static List<Long> snapshotIds(Long... ids) {
   }
 
   public static List<String> files(ContentFile<?>... files) {
-    return Arrays.stream(files).map(file -> file.path().toString()).collect(Collectors.toList());
+    return Arrays.stream(files).map(file -> file.location()).collect(Collectors.toList());
   }
 
   public static void validateDataManifest(
@@ -62,7 +62,7 @@ public static void validateDataManifest(
       actualDataSeqs.add(entry.dataSequenceNumber());
       actualFileSeqs.add(entry.fileSequenceNumber());
       actualSnapshotIds.add(entry.snapshotId());
-      actualFiles.add(entry.file().path().toString());
+      actualFiles.add(entry.file().location());
     }
 
     assertSameElements("data seqs", actualDataSeqs, dataSeqs);
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestBase.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestBase.java
index 40bc4bbce54e..86afd2f890ae 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestBase.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestBase.java
@@ -142,7 +142,7 @@ protected static String dbPath(String dbName) {
   }
 
   protected void withUnavailableFiles(Iterable<? extends ContentFile<?>> files, Action action) {
-    Iterable<String> fileLocations = Iterables.transform(files, file -> file.path().toString());
+    Iterable<String> fileLocations = Iterables.transform(files, file -> file.location());
     withUnavailableLocations(fileLocations, action);
   }
 
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestSparkExecutorCache.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestSparkExecutorCache.java
index c5463b4249d6..d9d7b78799ba 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestSparkExecutorCache.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestSparkExecutorCache.java
@@ -350,7 +350,7 @@ private void checkMerge(RowLevelOperationMode mode) throws Exception {
   }
 
   private int streamCount(DeleteFile deleteFile) {
-    CustomInputFile inputFile = INPUT_FILES.get(deleteFile.path().toString());
+    CustomInputFile inputFile = INPUT_FILES.get(deleteFile.location());
     return inputFile.streamCount();
   }
 
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
index ad93b80baf81..d5bb63b2d88a 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestDeleteReachableFilesAction.java
@@ -220,7 +220,7 @@ public void dataFilesCleanupWithParallelTasks() {
             file ->
                 assertThat(deletedFiles)
                     .as("FILE_A should be deleted")
-                    .contains(FILE_A.path().toString()));
+                    .contains(FILE_A.location()));
     checkRemoveFilesResults(4L, 0, 0, 6L, 4L, 6, result);
   }
 
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
index 661df99ef3e6..ffbe988e8d41 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/actions/TestExpireSnapshotsAction.java
@@ -261,8 +261,8 @@ public void dataFilesCleanupWithParallelTasks() throws IOException {
                 "remove-snapshot-2",
                 "remove-snapshot-3"));
 
-    assertThat(deletedFiles).as("FILE_A should be deleted").contains(FILE_A.path().toString());
-    assertThat(deletedFiles).as("FILE_B should be deleted").contains(FILE_B.path().toString());
+    assertThat(deletedFiles).as("FILE_A should be deleted").contains(FILE_A.location());
+    assertThat(deletedFiles).as("FILE_B should be deleted").contains(FILE_B.location());
 
     checkExpirationResults(2L, 0L, 0L, 3L, 3L, result);
   }
@@ -565,7 +565,7 @@ public void testScanExpiredManifestInValidSnapshotAppend() {
             .deleteWith(deletedFiles::add)
             .execute();
 
-    assertThat(deletedFiles).as("FILE_A should be deleted").contains(FILE_A.path().toString());
+    assertThat(deletedFiles).as("FILE_A should be deleted").contains(FILE_A.location());
     checkExpirationResults(1L, 0L, 0L, 1L, 2L, result);
   }
 
@@ -594,7 +594,7 @@ public void testScanExpiredManifestInValidSnapshotFastAppend() {
             .deleteWith(deletedFiles::add)
             .execute();
 
-    assertThat(deletedFiles).as("FILE_A should be deleted").contains(FILE_A.path().toString());
+    assertThat(deletedFiles).as("FILE_A should be deleted").contains(FILE_A.location());
     checkExpirationResults(1L, 0L, 0L, 1L, 2L, result);
   }
 
@@ -637,7 +637,7 @@ public void testWithExpiringDanglingStageCommit() {
         .addedDataFiles(table.io())
         .forEach(
             i -> {
-              expectedDeletes.add(i.path().toString());
+              expectedDeletes.add(i.location());
             });
 
     // ManifestList should be deleted too
@@ -707,7 +707,7 @@ public void testWithCherryPickTableSnapshot() {
               i.addedDataFiles(table.io())
                   .forEach(
                       item -> {
-                        assertThat(deletedFiles).doesNotContain(item.path().toString());
+                        assertThat(deletedFiles).doesNotContain(item.location());
                       });
             });
 
@@ -756,7 +756,7 @@ public void testWithExpiringStagedThenCherrypick() {
               i.addedDataFiles(table.io())
                   .forEach(
                       item -> {
-                        assertThat(deletedFiles).doesNotContain(item.path().toString());
+                        assertThat(deletedFiles).doesNotContain(item.location());
                       });
             });
     checkExpirationResults(0L, 0L, 0L, 1L, 1L, firstResult);
@@ -776,7 +776,7 @@ public void testWithExpiringStagedThenCherrypick() {
               i.addedDataFiles(table.io())
                   .forEach(
                       item -> {
-                        assertThat(deletedFiles).doesNotContain(item.path().toString());
+                        assertThat(deletedFiles).doesNotContain(item.location());
                       });
             });
     checkExpirationResults(0L, 0L, 0L, 0L, 2L, secondResult);
@@ -1100,9 +1100,9 @@ public void testExpireOlderThanWithDeleteFile() {
             secondSnapshot.manifestListLocation(),
             thirdSnapshot.manifestListLocation(),
             fourthSnapshot.manifestListLocation(),
-            FILE_A.path().toString(),
-            fileADeletes.path().toString(),
-            FILE_A_EQ_DELETES.path().toString());
+            FILE_A.location(),
+            fileADeletes.location(),
+            FILE_A_EQ_DELETES.location());
 
     expectedDeletes.addAll(
         thirdSnapshot.allManifests(table.io()).stream()
@@ -1277,7 +1277,7 @@ public void textExpireAllCheckFilesDeleted(int dataFilesExpired, int dataFilesRe
               .withPartitionPath("c1=1")
               .withRecordCount(1)
               .build();
-      dataFiles.add(df.path().toString());
+      dataFiles.add(df.location());
       table.newFastAppend().appendFile(df).commit();
     }
 
@@ -1351,9 +1351,9 @@ public void testExpireSomeCheckFilesDeleted() {
     // C, D should be retained (live)
     // B should be retained (previous snapshot points to it)
     // A should be deleted
-    assertThat(deletedFiles).contains(FILE_A.path().toString());
-    assertThat(deletedFiles).doesNotContain(FILE_B.path().toString());
-    assertThat(deletedFiles).doesNotContain(FILE_C.path().toString());
-    assertThat(deletedFiles).doesNotContain(FILE_D.path().toString());
+    assertThat(deletedFiles).contains(FILE_A.location());
+    assertThat(deletedFiles).doesNotContain(FILE_B.location());
+    assertThat(deletedFiles).doesNotContain(FILE_C.location());
+    assertThat(deletedFiles).doesNotContain(FILE_D.location());
   }
 }
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestBaseReader.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestBaseReader.java
index 7258344823f7..a6d7d4827c0d 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestBaseReader.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestBaseReader.java
@@ -114,7 +114,7 @@ public Boolean hasIterator(FileScanTask task) {
     }
 
     private String getKey(FileScanTask task) {
-      return task.file().path().toString();
+      return task.file().location();
     }
   }
 
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestCompressionSettings.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestCompressionSettings.java
index 217b05b46a7c..f411920a5dcc 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestCompressionSettings.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestCompressionSettings.java
@@ -209,7 +209,7 @@ public void testWriteDataWithDifferentSetting() throws Exception {
     List<ManifestFile> manifestFiles = table.currentSnapshot().dataManifests(table.io());
     try (ManifestReader<DataFile> reader = ManifestFiles.read(manifestFiles.get(0), table.io())) {
       DataFile file = reader.iterator().next();
-      InputFile inputFile = table.io().newInputFile(file.path().toString());
+      InputFile inputFile = table.io().newInputFile(file.location());
       assertThat(getCompressionType(inputFile))
           .isEqualToIgnoringCase(properties.get(COMPRESSION_CODEC));
     }
@@ -223,7 +223,7 @@ public void testWriteDataWithDifferentSetting() throws Exception {
     try (ManifestReader<DeleteFile> reader =
         ManifestFiles.readDeleteManifest(deleteManifestFiles.get(0), table.io(), specMap)) {
       DeleteFile file = reader.iterator().next();
-      InputFile inputFile = table.io().newInputFile(file.path().toString());
+      InputFile inputFile = table.io().newInputFile(file.location());
       assertThat(getCompressionType(inputFile))
           .isEqualToIgnoringCase(properties.get(COMPRESSION_CODEC));
     }
@@ -237,7 +237,7 @@ public void testWriteDataWithDifferentSetting() throws Exception {
     try (ManifestReader<DeleteFile> reader =
         ManifestFiles.readDeleteManifest(deleteManifestFiles.get(0), table.io(), specMap)) {
       DeleteFile file = reader.iterator().next();
-      InputFile inputFile = table.io().newInputFile(file.path().toString());
+      InputFile inputFile = table.io().newInputFile(file.location());
       assertThat(getCompressionType(inputFile))
           .isEqualToIgnoringCase(properties.get(COMPRESSION_CODEC));
     }
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWrites.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWrites.java
index a8b4c915868a..42552f385137 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWrites.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWrites.java
@@ -187,11 +187,11 @@ private void writeAndValidateWithLocations(Table table, File expectedDataDir) th
         .addedDataFiles(table.io())
         .forEach(
             dataFile ->
-                assertThat(URI.create(dataFile.path().toString()).getPath())
+                assertThat(URI.create(dataFile.location()).getPath())
                     .as(
                         String.format(
                             "File should have the parent directory %s, but has: %s.",
-                            expectedDataDir.getAbsolutePath(), dataFile.path()))
+                            expectedDataDir.getAbsolutePath(), dataFile.location()))
                     .startsWith(expectedDataDir.getAbsolutePath()));
   }
 
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java
index 627fe15f2819..c4ba96e63403 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestDataSourceOptions.java
@@ -109,7 +109,7 @@ public void testWriteFormatOptionOverridesTableProperties() throws IOException {
     try (CloseableIterable<FileScanTask> tasks = table.newScan().planFiles()) {
       tasks.forEach(
           task -> {
-            FileFormat fileFormat = FileFormat.fromFileName(task.file().path());
+            FileFormat fileFormat = FileFormat.fromFileName(task.file().location());
             assertThat(fileFormat).isEqualTo(FileFormat.PARQUET);
           });
     }
@@ -134,7 +134,7 @@ public void testNoWriteFormatOption() throws IOException {
     try (CloseableIterable<FileScanTask> tasks = table.newScan().planFiles()) {
       tasks.forEach(
           task -> {
-            FileFormat fileFormat = FileFormat.fromFileName(task.file().path());
+            FileFormat fileFormat = FileFormat.fromFileName(task.file().location());
             assertThat(fileFormat).isEqualTo(FileFormat.AVRO);
           });
     }
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesTable.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesTable.java
index ca934772f6af..983e52cdf897 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesTable.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesTable.java
@@ -134,8 +134,8 @@ public void testNullRows() throws IOException {
     tab.newAppend().appendFile(dFile).commit();
 
     List<Pair<CharSequence, Long>> deletes = Lists.newArrayList();
-    deletes.add(Pair.of(dFile.path(), 0L));
-    deletes.add(Pair.of(dFile.path(), 1L));
+    deletes.add(Pair.of(dFile.location(), 0L));
+    deletes.add(Pair.of(dFile.location(), 1L));
     Pair<DeleteFile, CharSequenceSet> posDeletes =
         FileHelpers.writeDeleteFile(
             tab,
@@ -147,9 +147,9 @@ public void testNullRows() throws IOException {
     StructLikeSet actual = actual(tableName, tab);
 
     List<PositionDelete<?>> expectedDeletes =
-        Lists.newArrayList(positionDelete(dFile.path(), 0L), positionDelete(dFile.path(), 1L));
-    StructLikeSet expected =
-        expected(tab, expectedDeletes, null, posDeletes.first().path().toString());
+        Lists.newArrayList(
+            positionDelete(dFile.location(), 0L), positionDelete(dFile.location(), 1L));
+    StructLikeSet expected = expected(tab, expectedDeletes, null, posDeletes.first().location());
 
     assertThat(actual).as("Position Delete table should contain expected rows").isEqualTo(expected);
     dropTable(tableName);
@@ -178,7 +178,7 @@ public void testPartitionedTable() throws IOException {
     GenericRecord partitionB = GenericRecord.create(tab.spec().partitionType());
     partitionB.setField("data", "b");
     StructLikeSet expected =
-        expected(tab, deletesB.first(), partitionB, deletesB.second().path().toString());
+        expected(tab, deletesB.first(), partitionB, deletesB.second().location());
 
     assertThat(actual).as("Position Delete table should contain expected rows").isEqualTo(expected);
     dropTable(tableName);
@@ -218,7 +218,7 @@ public void testSelect() throws IOException {
         (delete, file) -> {
           int rowData = delete.get(2, GenericRecord.class).get(0, Integer.class);
           long pos = delete.get(1, Long.class);
-          return row(rowData, pos, file.path().toString(), file.path().toString());
+          return row(rowData, pos, file.location(), file.location());
         };
     expected.addAll(
         deletesA.first().stream()
@@ -270,7 +270,7 @@ public void testSplitTasks() throws IOException {
 
     List<PositionDelete<?>> deletes = Lists.newArrayList();
     for (long i = 0; i < records; i++) {
-      deletes.add(positionDelete(tab.schema(), dFile.path(), i, (int) i, String.valueOf(i)));
+      deletes.add(positionDelete(tab.schema(), dFile.location(), i, (int) i, String.valueOf(i)));
     }
     DeleteFile posDeletes =
         FileHelpers.writePosDeleteFile(
@@ -294,7 +294,7 @@ public void testSplitTasks() throws IOException {
     }
 
     StructLikeSet actual = actual(tableName, tab);
-    StructLikeSet expected = expected(tab, deletes, null, posDeletes.path().toString());
+    StructLikeSet expected = expected(tab, deletes, null, posDeletes.location());
 
     assertThat(actual).as("Position Delete table should contain expected rows").isEqualTo(expected);
     dropTable(tableName);
@@ -324,9 +324,9 @@ public void testPartitionFilter() throws IOException {
     Record partitionA = partitionRecordTemplate.copy("data", "a");
     Record partitionB = partitionRecordTemplate.copy("data", "b");
     StructLikeSet expectedA =
-        expected(tab, deletesA.first(), partitionA, deletesA.second().path().toString());
+        expected(tab, deletesA.first(), partitionA, deletesA.second().location());
     StructLikeSet expectedB =
-        expected(tab, deletesB.first(), partitionB, deletesB.second().path().toString());
+        expected(tab, deletesB.first(), partitionB, deletesB.second().location());
     StructLikeSet allExpected = StructLikeSet.create(deletesTab.schema().asStruct());
     allExpected.addAll(expectedA);
     allExpected.addAll(expectedB);
@@ -371,9 +371,9 @@ public void testPartitionTransformFilter() throws IOException {
     Record partitionA = partitionRecordTemplate.copy("data_trunc", "a");
     Record partitionB = partitionRecordTemplate.copy("data_trunc", "b");
     StructLikeSet expectedA =
-        expected(tab, deletesA.first(), partitionA, deletesA.second().path().toString());
+        expected(tab, deletesA.first(), partitionA, deletesA.second().location());
     StructLikeSet expectedB =
-        expected(tab, deletesB.first(), partitionB, deletesB.second().path().toString());
+        expected(tab, deletesB.first(), partitionB, deletesB.second().location());
     StructLikeSet allExpected = StructLikeSet.create(deletesTable.schema().asStruct());
     allExpected.addAll(expectedA);
     allExpected.addAll(expectedB);
@@ -425,7 +425,7 @@ public void testPartitionEvolutionReplace() throws Exception {
     GenericRecord partitionRecordTemplate = GenericRecord.create(Partitioning.partitionType(tab));
     Record partitionA = partitionRecordTemplate.copy("data", "a");
     StructLikeSet expectedA =
-        expected(tab, deletesA.first(), partitionA, dataSpec, deletesA.second().path().toString());
+        expected(tab, deletesA.first(), partitionA, dataSpec, deletesA.second().location());
     StructLikeSet actualA = actual(tableName, tab, "partition.data = 'a' AND pos >= 0");
     assertThat(actualA)
         .as("Position Delete table should contain expected rows")
@@ -439,7 +439,7 @@ public void testPartitionEvolutionReplace() throws Exception {
             deletes10.first(),
             partition10,
             tab.spec().specId(),
-            deletes10.second().path().toString());
+            deletes10.second().location());
     StructLikeSet actual10 = actual(tableName, tab, "partition.id = 10 AND pos >= 0");
 
     assertThat(actual10)
@@ -479,7 +479,7 @@ public void testPartitionEvolutionAdd() throws Exception {
     GenericRecord partitionRecordTemplate = GenericRecord.create(Partitioning.partitionType(tab));
     Record partitionA = partitionRecordTemplate.copy("data", "a");
     StructLikeSet expectedA =
-        expected(tab, deletesA.first(), partitionA, specId1, deletesA.second().path().toString());
+        expected(tab, deletesA.first(), partitionA, specId1, deletesA.second().location());
     StructLikeSet actualA = actual(tableName, tab, "partition.data = 'a' AND pos >= 0");
     assertThat(actualA)
         .as("Position Delete table should contain expected rows")
@@ -493,7 +493,7 @@ public void testPartitionEvolutionAdd() throws Exception {
             deletesUnpartitioned.first(),
             unpartitionedRecord,
             specId0,
-            deletesUnpartitioned.second().path().toString());
+            deletesUnpartitioned.second().location());
     StructLikeSet actualUnpartitioned =
         actual(tableName, tab, "partition.data IS NULL and pos >= 0");
 
@@ -535,7 +535,7 @@ public void testPartitionEvolutionRemove() throws Exception {
     GenericRecord partitionRecordTemplate = GenericRecord.create(Partitioning.partitionType(tab));
     Record partitionA = partitionRecordTemplate.copy("data", "a");
     StructLikeSet expectedA =
-        expected(tab, deletesA.first(), partitionA, specId0, deletesA.second().path().toString());
+        expected(tab, deletesA.first(), partitionA, specId0, deletesA.second().location());
     StructLikeSet actualA = actual(tableName, tab, "partition.data = 'a' AND pos >= 0");
     assertThat(actualA)
         .as("Position Delete table should contain expected rows")
@@ -549,7 +549,7 @@ public void testPartitionEvolutionRemove() throws Exception {
             deletesUnpartitioned.first(),
             unpartitionedRecord,
             specId1,
-            deletesUnpartitioned.second().path().toString());
+            deletesUnpartitioned.second().location());
     StructLikeSet actualUnpartitioned =
         actual(tableName, tab, "partition.data IS NULL and pos >= 0");
 
@@ -593,7 +593,7 @@ public void testSpecIdFilter() throws Exception {
             deletesUnpartitioned.first(),
             partitionRecordTemplate,
             unpartitionedSpec,
-            deletesUnpartitioned.second().path().toString());
+            deletesUnpartitioned.second().location());
     StructLikeSet actualUnpartitioned =
         actual(tableName, tab, String.format("spec_id = %d", unpartitionedSpec));
     assertThat(actualUnpartitioned)
@@ -604,9 +604,9 @@ public void testSpecIdFilter() throws Exception {
     StructLike partitionA = partitionRecordTemplate.copy("data", "a");
     StructLike partitionB = partitionRecordTemplate.copy("data", "b");
     StructLikeSet expected =
-        expected(tab, deletesA.first(), partitionA, dataSpec, deletesA.second().path().toString());
+        expected(tab, deletesA.first(), partitionA, dataSpec, deletesA.second().location());
     expected.addAll(
-        expected(tab, deletesB.first(), partitionB, dataSpec, deletesB.second().path().toString()));
+        expected(tab, deletesB.first(), partitionB, dataSpec, deletesB.second().location()));
 
     StructLikeSet actual = actual(tableName, tab, String.format("spec_id = %d", dataSpec));
     assertThat(actual).as("Position Delete table should contain expected rows").isEqualTo(expected);
@@ -660,7 +660,7 @@ public void testSchemaEvolutionAdd() throws Exception {
           d.set(2, padded);
         });
     StructLikeSet expectedA =
-        expected(tab, expectedDeletesA, partitionA, deletesA.second().path().toString());
+        expected(tab, expectedDeletesA, partitionA, deletesA.second().location());
     StructLikeSet actualA = actual(tableName, tab, "partition.data = 'a' AND pos >= 0");
     assertThat(actualA)
         .as("Position Delete table should contain expected rows")
@@ -669,7 +669,7 @@ public void testSchemaEvolutionAdd() throws Exception {
     // Select deletes from new schema
     Record partitionC = partitionRecordTemplate.copy("data", "c");
     StructLikeSet expectedC =
-        expected(tab, deletesC.first(), partitionC, deletesC.second().path().toString());
+        expected(tab, deletesC.first(), partitionC, deletesC.second().location());
     StructLikeSet actualC = actual(tableName, tab, "partition.data = 'c' and pos >= 0");
 
     assertThat(actualC)
@@ -726,7 +726,7 @@ public void testSchemaEvolutionRemove() throws Exception {
           d.set(2, padded);
         });
     StructLikeSet expectedA =
-        expected(tab, expectedDeletesA, partitionA, deletesA.second().path().toString());
+        expected(tab, expectedDeletesA, partitionA, deletesA.second().location());
     StructLikeSet actualA = actual(tableName, tab, "partition.data = 'a' AND pos >= 0");
     assertThat(actualA)
         .as("Position Delete table should contain expected rows")
@@ -735,7 +735,7 @@ public void testSchemaEvolutionRemove() throws Exception {
     // Select deletes from new schema
     Record partitionC = partitionRecordTemplate.copy("data", "c");
     StructLikeSet expectedC =
-        expected(tab, deletesC.first(), partitionC, deletesC.second().path().toString());
+        expected(tab, deletesC.first(), partitionC, deletesC.second().location());
     StructLikeSet actualC = actual(tableName, tab, "partition.data = 'c' and pos >= 0");
 
     assertThat(actualC)
@@ -817,8 +817,8 @@ public void testWriteUnpartitionedNullRows() throws Exception {
     tab.newAppend().appendFile(dFile).commit();
 
     List<Pair<CharSequence, Long>> deletes = Lists.newArrayList();
-    deletes.add(Pair.of(dFile.path(), 0L));
-    deletes.add(Pair.of(dFile.path(), 1L));
+    deletes.add(Pair.of(dFile.location(), 0L));
+    deletes.add(Pair.of(dFile.location(), 1L));
     Pair<DeleteFile, CharSequenceSet> posDeletes =
         FileHelpers.writeDeleteFile(
             tab,
@@ -855,7 +855,8 @@ public void testWriteUnpartitionedNullRows() throws Exception {
         actual(tableName, tab, null, ImmutableList.of("file_path", "pos", "row", "spec_id"));
 
     List<PositionDelete<?>> expectedDeletes =
-        Lists.newArrayList(positionDelete(dFile.path(), 0L), positionDelete(dFile.path(), 1L));
+        Lists.newArrayList(
+            positionDelete(dFile.location(), 0L), positionDelete(dFile.location(), 1L));
     StructLikeSet expected = expected(tab, expectedDeletes, null, null);
 
     assertThat(actual).as("Position Delete table should contain expected rows").isEqualTo(expected);
@@ -874,8 +875,8 @@ public void testWriteMixedRows() throws Exception {
 
     // Add a delete file with row and without row
     List<Pair<CharSequence, Long>> deletes = Lists.newArrayList();
-    deletes.add(Pair.of(dataFileA.path(), 0L));
-    deletes.add(Pair.of(dataFileA.path(), 1L));
+    deletes.add(Pair.of(dataFileA.location(), 0L));
+    deletes.add(Pair.of(dataFileA.location(), 1L));
     Pair<DeleteFile, CharSequenceSet> deletesWithoutRow =
         FileHelpers.writeDeleteFile(
             tab,
@@ -936,7 +937,7 @@ public void testWriteMixedRows() throws Exception {
         expected(
             tab,
             Lists.newArrayList(
-                positionDelete(dataFileA.path(), 0L), positionDelete(dataFileA.path(), 1L)),
+                positionDelete(dataFileA.location(), 0L), positionDelete(dataFileA.location(), 1L)),
             partitionA,
             null));
     allExpected.addAll(expected(tab, deletesWithRow.first(), partitionB, null));
@@ -1530,13 +1531,13 @@ private Pair<List<PositionDelete<?>>, DeleteFile> deleteFile(
         Lists.newArrayList(
             positionDelete(
                 tab.schema(),
-                dataFile.path(),
+                dataFile.location(),
                 0L,
                 idPartition != null ? idPartition : 29,
                 dataPartition != null ? dataPartition : "c"),
             positionDelete(
                 tab.schema(),
-                dataFile.path(),
+                dataFile.location(),
                 1L,
                 idPartition != null ? idPartition : 61,
                 dataPartition != null ? dataPartition : "r"));
@@ -1585,9 +1586,9 @@ private void commit(
     assertThat(addedFiles).hasSize(expectedTargetFiles);
 
     List<String> sortedAddedFiles =
-        addedFiles.stream().map(f -> f.path().toString()).sorted().collect(Collectors.toList());
+        addedFiles.stream().map(f -> f.location()).sorted().collect(Collectors.toList());
     List<String> sortedRewrittenFiles =
-        rewrittenFiles.stream().map(f -> f.path().toString()).sorted().collect(Collectors.toList());
+        rewrittenFiles.stream().map(f -> f.location()).sorted().collect(Collectors.toList());
     assertThat(sortedRewrittenFiles)
         .as("Lists should not be the same")
         .isNotEqualTo(sortedAddedFiles);
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestRuntimeFiltering.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestRuntimeFiltering.java
index 21085b49df23..e7346e270f38 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestRuntimeFiltering.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestRuntimeFiltering.java
@@ -483,7 +483,7 @@ private void deleteNotMatchingFiles(Expression filter, int expectedDeletedFileCo
     Set<String> matchingFileLocations = Sets.newHashSet();
     try (CloseableIterable<FileScanTask> files = table.newScan().filter(filter).planFiles()) {
       for (FileScanTask file : files) {
-        String path = file.file().path().toString();
+        String path = file.file().location();
         matchingFileLocations.add(path);
       }
     } catch (IOException e) {
@@ -493,7 +493,7 @@ private void deleteNotMatchingFiles(Expression filter, int expectedDeletedFileCo
     Set<String> deletedFileLocations = Sets.newHashSet();
     try (CloseableIterable<FileScanTask> files = table.newScan().planFiles()) {
       for (FileScanTask file : files) {
-        String path = file.file().path().toString();
+        String path = file.file().location();
         if (!matchingFileLocations.contains(path)) {
           io.deleteFile(path);
           deletedFileLocations.add(path);
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkDataFile.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkDataFile.java
index c9604863b9fa..182b1ef8f5af 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkDataFile.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkDataFile.java
@@ -279,7 +279,7 @@ private void checkDeleteFile(DeleteFile expected, DeleteFile actual) {
 
   private void checkContentFile(ContentFile<?> expected, ContentFile<?> actual) {
     assertThat(actual.content()).isEqualTo(expected.content());
-    assertThat(actual.path()).isEqualTo(expected.path());
+    assertThat(actual.location()).isEqualTo(expected.location());
     assertThat(actual.format()).isEqualTo(expected.format());
     assertThat(actual.recordCount()).isEqualTo(expected.recordCount());
     assertThat(actual.fileSizeInBytes()).isEqualTo(expected.fileSizeInBytes());
@@ -317,10 +317,10 @@ private DeleteFile createPositionDeleteFile(Table table, DataFile dataFile) {
                 null, // no NaN counts
                 ImmutableMap.of(
                     MetadataColumns.DELETE_FILE_PATH.fieldId(),
-                    Conversions.toByteBuffer(Types.StringType.get(), dataFile.path())),
+                    Conversions.toByteBuffer(Types.StringType.get(), dataFile.location())),
                 ImmutableMap.of(
                     MetadataColumns.DELETE_FILE_PATH.fieldId(),
-                    Conversions.toByteBuffer(Types.StringType.get(), dataFile.path()))))
+                    Conversions.toByteBuffer(Types.StringType.get(), dataFile.location()))))
         .withEncryptionKeyMetadata(ByteBuffer.allocate(4).putInt(35))
         .build();
   }
diff --git a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
index d49b450524d9..d1ed1dc2b3cf 100644
--- a/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
+++ b/spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestSparkReaderDeletes.java
@@ -343,10 +343,10 @@ public void testPosDeletesAllRowsInBatch() throws IOException {
     // deleted.
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 0L), // id = 29
-            Pair.of(dataFile.path(), 1L), // id = 43
-            Pair.of(dataFile.path(), 2L), // id = 61
-            Pair.of(dataFile.path(), 3L) // id = 89
+            Pair.of(dataFile.location(), 0L), // id = 29
+            Pair.of(dataFile.location(), 1L), // id = 43
+            Pair.of(dataFile.location(), 2L), // id = 61
+            Pair.of(dataFile.location(), 3L) // id = 89
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
@@ -376,10 +376,10 @@ public void testPosDeletesWithDeletedColumn() throws IOException {
     // deleted.
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 0L), // id = 29
-            Pair.of(dataFile.path(), 1L), // id = 43
-            Pair.of(dataFile.path(), 2L), // id = 61
-            Pair.of(dataFile.path(), 3L) // id = 89
+            Pair.of(dataFile.location(), 0L), // id = 29
+            Pair.of(dataFile.location(), 1L), // id = 43
+            Pair.of(dataFile.location(), 2L), // id = 61
+            Pair.of(dataFile.location(), 3L) // id = 89
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
@@ -455,8 +455,8 @@ public void testMixedPosAndEqDeletesWithDeletedColumn() throws IOException {
 
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 3L), // id = 89
-            Pair.of(dataFile.path(), 5L) // id = 121
+            Pair.of(dataFile.location(), 3L), // id = 89
+            Pair.of(dataFile.location(), 5L) // id = 121
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
@@ -486,10 +486,10 @@ public void testMixedPosAndEqDeletesWithDeletedColumn() throws IOException {
   public void testFilterOnDeletedMetadataColumn() throws IOException {
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 0L), // id = 29
-            Pair.of(dataFile.path(), 1L), // id = 43
-            Pair.of(dataFile.path(), 2L), // id = 61
-            Pair.of(dataFile.path(), 3L) // id = 89
+            Pair.of(dataFile.location(), 0L), // id = 29
+            Pair.of(dataFile.location(), 1L), // id = 43
+            Pair.of(dataFile.location(), 2L), // id = 61
+            Pair.of(dataFile.location(), 3L) // id = 89
             );
 
     Pair<DeleteFile, CharSequenceSet> posDeletes =
@@ -611,13 +611,13 @@ public void testPosDeletesOnParquetFileWithMultipleRowGroups() throws IOExceptio
     // Add positional deletes to the table
     List<Pair<CharSequence, Long>> deletes =
         Lists.newArrayList(
-            Pair.of(dataFile.path(), 97L),
-            Pair.of(dataFile.path(), 98L),
-            Pair.of(dataFile.path(), 99L),
-            Pair.of(dataFile.path(), 101L),
-            Pair.of(dataFile.path(), 103L),
-            Pair.of(dataFile.path(), 107L),
-            Pair.of(dataFile.path(), 109L));
+            Pair.of(dataFile.location(), 97L),
+            Pair.of(dataFile.location(), 98L),
+            Pair.of(dataFile.location(), 99L),
+            Pair.of(dataFile.location(), 101L),
+            Pair.of(dataFile.location(), 103L),
+            Pair.of(dataFile.location(), 107L),
+            Pair.of(dataFile.location(), 109L));
     Pair<DeleteFile, CharSequenceSet> posDeletes =
         FileHelpers.writeDeleteFile(
             table,