Skip to content

Commit

Permalink
chore(refactor): remove deprecated StorageInterface method
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Jan 11, 2024
1 parent c5ba33b commit 5461cf3
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/main/java/io/kestra/storage/gcs/GcsStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,36 +140,6 @@ public boolean exists(String tenantId, URI uri) {
}
}

@Override
public Long size(String tenantId,URI uri) throws IOException {
try {
Blob blob = this.storage.get(this.blob(tenantId, URI.create(uri.getPath())));

if (blob == null || !blob.exists()) {
throw new FileNotFoundException(uri + " (File not found)");
}

return blob.getSize();
} catch (StorageException e) {
throw new IOException(e);
}
}

@Override
public Long lastModifiedTime(String tenantId,URI uri) throws IOException {
try {
Blob blob = this.storage.get(this.blob(tenantId, URI.create(uri.getPath())));

if (blob == null || !blob.exists()) {
throw new FileNotFoundException(uri + " (File not found)");
}

return blob.getUpdateTimeOffsetDateTime().toInstant().toEpochMilli();
} catch (StorageException e) {
throw new IOException(e);
}
}

@Override
public FileAttributes getAttributes(String tenantId, URI uri) throws IOException {
String path = getPath(tenantId, uri);
Expand Down

0 comments on commit 5461cf3

Please sign in to comment.