From 4e99afa8f2e355ae219251c4c32878ac38a6125a Mon Sep 17 00:00:00 2001 From: Geetansh Juneja Date: Mon, 30 Dec 2024 09:33:15 +0530 Subject: [PATCH] feat(services/core): Implement stat_has_* and list_has_* correctly for services (#5472) --- core/src/services/aliyun_drive/backend.rs | 5 +++++ core/src/services/alluxio/backend.rs | 4 ++++ core/src/services/azblob/backend.rs | 14 ++++++++++++++ core/src/services/azdls/backend.rs | 12 ++++++++++++ core/src/services/azfile/backend.rs | 12 ++++++++++++ core/src/services/b2/backend.rs | 6 ++++++ core/src/services/chainsafe/backend.rs | 4 ++++ core/src/services/compfs/backend.rs | 1 + core/src/services/cos/backend.rs | 10 ++++++++++ core/src/services/dbfs/backend.rs | 11 +++++++++++ core/src/services/dropbox/backend.rs | 4 ++++ core/src/services/fs/backend.rs | 2 ++ core/src/services/ftp/backend.rs | 4 ++++ core/src/services/gcs/backend.rs | 11 +++++++++++ core/src/services/gdrive/backend.rs | 2 ++ core/src/services/ghac/backend.rs | 10 ++++++++++ core/src/services/github/backend.rs | 4 ++++ core/src/services/hdfs/backend.rs | 4 ++++ core/src/services/hdfs_native/backend.rs | 2 ++ core/src/services/http/backend.rs | 9 +++++++++ core/src/services/huggingface/backend.rs | 4 ++++ core/src/services/icloud/backend.rs | 4 ++++ core/src/services/ipfs/backend.rs | 4 ++++ core/src/services/ipmfs/backend.rs | 2 ++ core/src/services/koofr/backend.rs | 6 ++++++ core/src/services/lakefs/backend.rs | 7 +++++++ core/src/services/monoiofs/backend.rs | 3 +++ core/src/services/obs/backend.rs | 11 +++++++++++ core/src/services/onedrive/backend.rs | 3 +++ core/src/services/oss/backend.rs | 14 ++++++++++++++ core/src/services/pcloud/backend.rs | 4 ++++ core/src/services/pcloud/core.rs | 8 -------- core/src/services/s3/backend.rs | 14 ++++++++++++++ core/src/services/seafile/backend.rs | 4 ++++ core/src/services/sftp/backend.rs | 4 ++++ core/src/services/swift/backend.rs | 13 +++++++++++++ core/src/services/upyun/backend.rs | 8 ++++++++ core/src/services/vercel_artifacts/backend.rs | 9 +++++++++ core/src/services/vercel_blob/backend.rs | 8 ++++++++ core/src/services/webdav/backend.rs | 9 +++++++++ core/src/services/webhdfs/backend.rs | 4 ++++ core/src/services/yandex_disk/backend.rs | 8 ++++++++ 42 files changed, 274 insertions(+), 8 deletions(-) diff --git a/core/src/services/aliyun_drive/backend.rs b/core/src/services/aliyun_drive/backend.rs index 5a5669c0d55a..066e43d31a71 100644 --- a/core/src/services/aliyun_drive/backend.rs +++ b/core/src/services/aliyun_drive/backend.rs @@ -234,6 +234,11 @@ impl Access for AliyunDriveBackend { list: true, list_with_limit: true, shared: true, + stat_has_content_length: true, + stat_has_content_type: true, + list_has_last_modified: true, + list_has_content_length: true, + list_has_content_type: true, ..Default::default() }); am.into() diff --git a/core/src/services/alluxio/backend.rs b/core/src/services/alluxio/backend.rs index e3ff2acb170c..8a85c2d6680a 100644 --- a/core/src/services/alluxio/backend.rs +++ b/core/src/services/alluxio/backend.rs @@ -173,6 +173,10 @@ impl Access for AlluxioBackend { list: true, shared: true, + stat_has_content_length: true, + stat_has_last_modified: true, + list_has_content_length: true, + list_has_last_modified: true, ..Default::default() }); diff --git a/core/src/services/azblob/backend.rs b/core/src/services/azblob/backend.rs index 20ac5ef3e188..464d7c7116f6 100644 --- a/core/src/services/azblob/backend.rs +++ b/core/src/services/azblob/backend.rs @@ -500,6 +500,15 @@ impl Access for AzblobBackend { stat: true, stat_with_if_match: true, stat_with_if_none_match: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, @@ -524,6 +533,11 @@ impl Access for AzblobBackend { list: true, list_with_recursive: true, + list_has_etag: true, + list_has_content_length: true, + list_has_content_md5: true, + list_has_content_type: true, + list_has_last_modified: true, presign: self.has_sas_token, presign_stat: self.has_sas_token, diff --git a/core/src/services/azdls/backend.rs b/core/src/services/azdls/backend.rs index b2a6b493d318..0f2742fbe5ab 100644 --- a/core/src/services/azdls/backend.rs +++ b/core/src/services/azdls/backend.rs @@ -231,6 +231,15 @@ impl Access for AzdlsBackend { .set_name(&self.core.filesystem) .set_native_capability(Capability { stat: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, @@ -244,6 +253,9 @@ impl Access for AzdlsBackend { rename: true, list: true, + list_has_etag: true, + list_has_content_length: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/azfile/backend.rs b/core/src/services/azfile/backend.rs index 46ebb283bd2f..0bf71741a08e 100644 --- a/core/src/services/azfile/backend.rs +++ b/core/src/services/azfile/backend.rs @@ -246,6 +246,15 @@ impl Access for AzfileBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, @@ -255,6 +264,9 @@ impl Access for AzfileBackend { rename: true, list: true, + list_has_etag: true, + list_has_last_modified: true, + list_has_content_length: true, shared: true, diff --git a/core/src/services/b2/backend.rs b/core/src/services/b2/backend.rs index be3f61435bd2..e8f4c25130a7 100644 --- a/core/src/services/b2/backend.rs +++ b/core/src/services/b2/backend.rs @@ -229,6 +229,9 @@ impl Access for B2Backend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_md5: true, + stat_has_content_type: true, read: true, @@ -256,6 +259,9 @@ impl Access for B2Backend { list_with_limit: true, list_with_start_after: true, list_with_recursive: true, + list_has_content_length: true, + list_has_content_md5: true, + list_has_content_type: true, presign: true, presign_read: true, diff --git a/core/src/services/chainsafe/backend.rs b/core/src/services/chainsafe/backend.rs index 80a403a89c9d..be429b7f9c81 100644 --- a/core/src/services/chainsafe/backend.rs +++ b/core/src/services/chainsafe/backend.rs @@ -179,6 +179,8 @@ impl Access for ChainsafeBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_type: true, read: true, @@ -189,6 +191,8 @@ impl Access for ChainsafeBackend { delete: true, list: true, + list_has_content_length: true, + list_has_content_type: true, shared: true, diff --git a/core/src/services/compfs/backend.rs b/core/src/services/compfs/backend.rs index ba323b50f84f..370ee1ddf720 100644 --- a/core/src/services/compfs/backend.rs +++ b/core/src/services/compfs/backend.rs @@ -120,6 +120,7 @@ impl Access for CompfsBackend { .set_root(&self.core.root.to_string_lossy()) .set_native_capability(Capability { stat: true, + stat_has_last_modified: true, read: true, diff --git a/core/src/services/cos/backend.rs b/core/src/services/cos/backend.rs index e7efbc078e17..86d7e342ca36 100644 --- a/core/src/services/cos/backend.rs +++ b/core/src/services/cos/backend.rs @@ -248,6 +248,15 @@ impl Access for CosBackend { stat: true, stat_with_if_match: true, stat_with_if_none_match: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, @@ -281,6 +290,7 @@ impl Access for CosBackend { list: true, list_with_recursive: true, + list_has_content_length: true, presign: true, presign_stat: true, diff --git a/core/src/services/dbfs/backend.rs b/core/src/services/dbfs/backend.rs index 93c2ec36f24c..fb84a597fccc 100644 --- a/core/src/services/dbfs/backend.rs +++ b/core/src/services/dbfs/backend.rs @@ -158,6 +158,15 @@ impl Access for DbfsBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, write: true, create_dir: true, @@ -165,6 +174,8 @@ impl Access for DbfsBackend { rename: true, list: true, + list_has_last_modified: true, + list_has_content_length: true, shared: true, diff --git a/core/src/services/dropbox/backend.rs b/core/src/services/dropbox/backend.rs index c7cd15572231..1711fb67dcdd 100644 --- a/core/src/services/dropbox/backend.rs +++ b/core/src/services/dropbox/backend.rs @@ -51,6 +51,8 @@ impl Access for DropboxBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_last_modified: true, + stat_has_content_length: true, read: true, @@ -62,6 +64,8 @@ impl Access for DropboxBackend { list: true, list_with_recursive: true, + list_has_last_modified: true, + list_has_content_length: true, copy: true, diff --git a/core/src/services/fs/backend.rs b/core/src/services/fs/backend.rs index d2ca09608b1b..1a0afb9c2e86 100644 --- a/core/src/services/fs/backend.rs +++ b/core/src/services/fs/backend.rs @@ -178,6 +178,8 @@ impl Access for FsBackend { .set_root(&self.core.root.to_string_lossy()) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, diff --git a/core/src/services/ftp/backend.rs b/core/src/services/ftp/backend.rs index 460cdc815770..a3b657aea7ba 100644 --- a/core/src/services/ftp/backend.rs +++ b/core/src/services/ftp/backend.rs @@ -272,6 +272,8 @@ impl Access for FtpBackend { .set_root(&self.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, @@ -283,6 +285,8 @@ impl Access for FtpBackend { create_dir: true, list: true, + list_has_content_length: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/gcs/backend.rs b/core/src/services/gcs/backend.rs index c1227098ff23..c61ff75ca290 100644 --- a/core/src/services/gcs/backend.rs +++ b/core/src/services/gcs/backend.rs @@ -358,6 +358,12 @@ impl Access for GcsBackend { stat: true, stat_with_if_match: true, stat_with_if_none_match: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_last_modified: true, + stat_has_user_metadata: true, read: true, @@ -392,6 +398,11 @@ impl Access for GcsBackend { list_with_limit: true, list_with_start_after: true, list_with_recursive: true, + list_has_etag: true, + list_has_content_md5: true, + list_has_content_length: true, + list_has_content_type: true, + list_has_last_modified: true, presign: true, presign_stat: true, diff --git a/core/src/services/gdrive/backend.rs b/core/src/services/gdrive/backend.rs index 0fc6f7e24e60..e254f627df95 100644 --- a/core/src/services/gdrive/backend.rs +++ b/core/src/services/gdrive/backend.rs @@ -64,6 +64,8 @@ impl Access for GdriveBackend { list: true, list_has_content_type: true, + list_has_content_length: true, + list_has_etag: true, write: true, diff --git a/core/src/services/ghac/backend.rs b/core/src/services/ghac/backend.rs index adc1ee6c8adc..ad25eefbe583 100644 --- a/core/src/services/ghac/backend.rs +++ b/core/src/services/ghac/backend.rs @@ -244,6 +244,16 @@ impl Access for GhacBackend { .set_name(&self.version) .set_native_capability(Capability { stat: true, + stat_with_if_none_match: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, diff --git a/core/src/services/github/backend.rs b/core/src/services/github/backend.rs index 11b085987d48..edcdb668341e 100644 --- a/core/src/services/github/backend.rs +++ b/core/src/services/github/backend.rs @@ -184,6 +184,8 @@ impl Access for GithubBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_etag: true, read: true, @@ -196,6 +198,8 @@ impl Access for GithubBackend { list: true, list_with_recursive: true, + list_has_content_length: true, + list_has_etag: true, shared: true, diff --git a/core/src/services/hdfs/backend.rs b/core/src/services/hdfs/backend.rs index da5039437dda..c4497ce0c1e0 100644 --- a/core/src/services/hdfs/backend.rs +++ b/core/src/services/hdfs/backend.rs @@ -219,6 +219,8 @@ impl Access for HdfsBackend { .set_root(&self.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, @@ -229,6 +231,8 @@ impl Access for HdfsBackend { delete: true, list: true, + list_has_content_length: true, + list_has_last_modified: true, rename: true, blocking: true, diff --git a/core/src/services/hdfs_native/backend.rs b/core/src/services/hdfs_native/backend.rs index 3884a5f16303..80f607d5140b 100644 --- a/core/src/services/hdfs_native/backend.rs +++ b/core/src/services/hdfs_native/backend.rs @@ -158,6 +158,8 @@ impl Access for HdfsNativeBackend { .set_root(&self.root) .set_native_capability(Capability { stat: true, + stat_has_last_modified: true, + stat_has_content_length: true, delete: true, rename: true, diff --git a/core/src/services/http/backend.rs b/core/src/services/http/backend.rs index 4fd894d9946e..41b0483e50db 100644 --- a/core/src/services/http/backend.rs +++ b/core/src/services/http/backend.rs @@ -210,6 +210,15 @@ impl Access for HttpBackend { stat: true, stat_with_if_match: true, stat_with_if_none_match: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, diff --git a/core/src/services/huggingface/backend.rs b/core/src/services/huggingface/backend.rs index 7be0ce152027..9b4632fac8a8 100644 --- a/core/src/services/huggingface/backend.rs +++ b/core/src/services/huggingface/backend.rs @@ -205,11 +205,15 @@ impl Access for HuggingfaceBackend { am.set_scheme(Scheme::Huggingface) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, list: true, list_with_recursive: true, + list_has_content_length: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/icloud/backend.rs b/core/src/services/icloud/backend.rs index 1ba0f2c3662f..bbdb77d0cdb1 100644 --- a/core/src/services/icloud/backend.rs +++ b/core/src/services/icloud/backend.rs @@ -240,7 +240,11 @@ impl Access for IcloudBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, + read: true, + shared: true, ..Default::default() }); diff --git a/core/src/services/ipfs/backend.rs b/core/src/services/ipfs/backend.rs index 026549853386..2b38cd9a041b 100644 --- a/core/src/services/ipfs/backend.rs +++ b/core/src/services/ipfs/backend.rs @@ -176,6 +176,10 @@ impl Access for IpfsBackend { .set_root(&self.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_etag: true, + stat_has_content_disposition: true, read: true, diff --git a/core/src/services/ipmfs/backend.rs b/core/src/services/ipmfs/backend.rs index 1f1e63584f80..b683d144b6f6 100644 --- a/core/src/services/ipmfs/backend.rs +++ b/core/src/services/ipmfs/backend.rs @@ -77,6 +77,7 @@ impl Access for IpmfsBackend { .set_root(&self.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, read: true, @@ -84,6 +85,7 @@ impl Access for IpmfsBackend { delete: true, list: true, + list_has_content_length: true, shared: true, diff --git a/core/src/services/koofr/backend.rs b/core/src/services/koofr/backend.rs index e5af50e351af..7e0220d1ffeb 100644 --- a/core/src/services/koofr/backend.rs +++ b/core/src/services/koofr/backend.rs @@ -211,6 +211,9 @@ impl Access for KoofrBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_last_modified: true, create_dir: true, @@ -226,6 +229,9 @@ impl Access for KoofrBackend { copy: true, list: true, + list_has_content_length: true, + list_has_content_type: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/lakefs/backend.rs b/core/src/services/lakefs/backend.rs index 084ca58343a6..39dd20557151 100644 --- a/core/src/services/lakefs/backend.rs +++ b/core/src/services/lakefs/backend.rs @@ -209,7 +209,14 @@ impl Access for LakefsBackend { am.set_scheme(Scheme::Lakefs) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_disposition: true, + stat_has_last_modified: true, + list: true, + list_has_content_length: true, + list_has_last_modified: true, + read: true, write: true, delete: true, diff --git a/core/src/services/monoiofs/backend.rs b/core/src/services/monoiofs/backend.rs index 863fbe668087..afdca2d7d67a 100644 --- a/core/src/services/monoiofs/backend.rs +++ b/core/src/services/monoiofs/backend.rs @@ -117,6 +117,9 @@ impl Access for MonoiofsBackend { .set_root(&self.core.root().to_string_lossy()) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, + read: true, write: true, write_can_append: true, diff --git a/core/src/services/obs/backend.rs b/core/src/services/obs/backend.rs index 28b33d37de43..8aaa99741a9d 100644 --- a/core/src/services/obs/backend.rs +++ b/core/src/services/obs/backend.rs @@ -261,6 +261,16 @@ impl Access for ObsBackend { stat: true, stat_with_if_match: true, stat_with_if_none_match: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, + stat_has_user_metadata: true, read: true, @@ -292,6 +302,7 @@ impl Access for ObsBackend { list: true, list_with_recursive: true, + list_has_content_length: true, presign: true, presign_stat: true, diff --git a/core/src/services/onedrive/backend.rs b/core/src/services/onedrive/backend.rs index 35af133a8e5c..1f6410f7b13f 100644 --- a/core/src/services/onedrive/backend.rs +++ b/core/src/services/onedrive/backend.rs @@ -80,6 +80,9 @@ impl Access for OnedriveBackend { read: true, write: true, stat: true, + stat_has_etag: true, + stat_has_last_modified: true, + stat_has_content_length: true, delete: true, create_dir: true, list: true, diff --git a/core/src/services/oss/backend.rs b/core/src/services/oss/backend.rs index b72eeb1311ec..0ec56cdc2acd 100644 --- a/core/src/services/oss/backend.rs +++ b/core/src/services/oss/backend.rs @@ -444,6 +444,16 @@ impl Access for OssBackend { stat: true, stat_with_if_match: true, stat_with_if_none_match: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, + stat_has_user_metadata: true, read: true, @@ -483,6 +493,10 @@ impl Access for OssBackend { list_with_limit: true, list_with_start_after: true, list_with_recursive: true, + list_has_etag: true, + list_has_content_md5: true, + list_has_content_length: true, + list_has_last_modified: true, presign: true, presign_stat: true, diff --git a/core/src/services/pcloud/backend.rs b/core/src/services/pcloud/backend.rs index 4702d8778b03..5a72ac4f3f9a 100644 --- a/core/src/services/pcloud/backend.rs +++ b/core/src/services/pcloud/backend.rs @@ -203,6 +203,8 @@ impl Access for PcloudBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, create_dir: true, @@ -215,6 +217,8 @@ impl Access for PcloudBackend { copy: true, list: true, + list_has_content_length: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/pcloud/core.rs b/core/src/services/pcloud/core.rs index 03cfb7fb3b09..3b52465689e3 100644 --- a/core/src/services/pcloud/core.rs +++ b/core/src/services/pcloud/core.rs @@ -369,10 +369,6 @@ pub(super) fn parse_stat_metadata(content: StatMetadata) -> Result { md.set_content_length(size); } - if let Some(size) = content.size { - md.set_content_length(size); - } - md.set_last_modified(parse_datetime_from_rfc2822(&content.modified)?); Ok(md) @@ -389,10 +385,6 @@ pub(super) fn parse_list_metadata(content: ListMetadata) -> Result { md.set_content_length(size); } - if let Some(size) = content.size { - md.set_content_length(size); - } - md.set_last_modified(parse_datetime_from_rfc2822(&content.modified)?); Ok(md) diff --git a/core/src/services/s3/backend.rs b/core/src/services/s3/backend.rs index eb9a4370b089..2d8ba50588e3 100644 --- a/core/src/services/s3/backend.rs +++ b/core/src/services/s3/backend.rs @@ -930,6 +930,16 @@ impl Access for S3Backend { stat_with_override_content_disposition: !self.core.disable_stat_with_override, stat_with_override_content_type: !self.core.disable_stat_with_override, stat_with_version: self.core.enable_versioning, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, + stat_has_user_metadata: true, + stat_has_version: true, read: true, read_with_if_match: true, @@ -973,6 +983,10 @@ impl Access for S3Backend { list_with_start_after: true, list_with_recursive: true, list_with_version: self.core.enable_versioning, + list_has_etag: true, + list_has_content_md5: true, + list_has_content_length: true, + list_has_last_modified: true, presign: true, presign_stat: true, diff --git a/core/src/services/seafile/backend.rs b/core/src/services/seafile/backend.rs index a8a1f98e3efa..a399191f9b2d 100644 --- a/core/src/services/seafile/backend.rs +++ b/core/src/services/seafile/backend.rs @@ -225,6 +225,8 @@ impl Access for SeafileBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, @@ -234,6 +236,8 @@ impl Access for SeafileBackend { delete: true, list: true, + list_has_content_length: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/sftp/backend.rs b/core/src/services/sftp/backend.rs index 5adf389ea9dd..9f340c94ad32 100644 --- a/core/src/services/sftp/backend.rs +++ b/core/src/services/sftp/backend.rs @@ -332,6 +332,8 @@ impl Access for SftpBackend { .set_scheme(Scheme::Sftp) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, @@ -343,6 +345,8 @@ impl Access for SftpBackend { list: true, list_with_limit: true, + list_has_content_length: true, + list_has_last_modified: true, copy: self.copyable, rename: true, diff --git a/core/src/services/swift/backend.rs b/core/src/services/swift/backend.rs index 12d2cb123311..0ae1923d1097 100644 --- a/core/src/services/swift/backend.rs +++ b/core/src/services/swift/backend.rs @@ -189,6 +189,15 @@ impl Access for SwiftBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, @@ -198,6 +207,10 @@ impl Access for SwiftBackend { list: true, list_with_recursive: true, + list_has_content_length: true, + list_has_content_md5: true, + list_has_content_type: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/upyun/backend.rs b/core/src/services/upyun/backend.rs index 4373d357c21b..d74021d61c6d 100644 --- a/core/src/services/upyun/backend.rs +++ b/core/src/services/upyun/backend.rs @@ -204,6 +204,11 @@ impl Access for UpyunBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_md5: true, + stat_has_cache_control: true, + stat_has_content_disposition: true, create_dir: true, @@ -225,6 +230,9 @@ impl Access for UpyunBackend { list: true, list_with_limit: true, + list_has_content_length: true, + list_has_content_type: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/vercel_artifacts/backend.rs b/core/src/services/vercel_artifacts/backend.rs index 638afed26b21..f0a479bed2c2 100644 --- a/core/src/services/vercel_artifacts/backend.rs +++ b/core/src/services/vercel_artifacts/backend.rs @@ -58,6 +58,15 @@ impl Access for VercelArtifactsBackend { ma.set_scheme(Scheme::VercelArtifacts) .set_native_capability(Capability { stat: true, + stat_has_cache_control: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_content_encoding: true, + stat_has_content_range: true, + stat_has_etag: true, + stat_has_content_md5: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, diff --git a/core/src/services/vercel_blob/backend.rs b/core/src/services/vercel_blob/backend.rs index 53ea1f5ef500..730377931a8f 100644 --- a/core/src/services/vercel_blob/backend.rs +++ b/core/src/services/vercel_blob/backend.rs @@ -159,6 +159,10 @@ impl Access for VercelBlobBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_type: true, + stat_has_content_length: true, + stat_has_last_modified: true, + stat_has_content_disposition: true, read: true, @@ -171,6 +175,10 @@ impl Access for VercelBlobBackend { list: true, list_with_limit: true, + list_has_content_type: true, + list_has_content_length: true, + list_has_last_modified: true, + list_has_content_disposition: true, shared: true, diff --git a/core/src/services/webdav/backend.rs b/core/src/services/webdav/backend.rs index 81f2bfb0ad2d..88d950e125b0 100644 --- a/core/src/services/webdav/backend.rs +++ b/core/src/services/webdav/backend.rs @@ -218,6 +218,10 @@ impl Access for WebdavBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_content_type: true, + stat_has_etag: true, + stat_has_last_modified: true, read: true, @@ -232,6 +236,11 @@ impl Access for WebdavBackend { rename: true, list: true, + list_has_content_length: true, + list_has_content_type: true, + list_has_etag: true, + list_has_last_modified: true, + // We already support recursive list but some details still need to polish. // list_with_recursive: true, shared: true, diff --git a/core/src/services/webhdfs/backend.rs b/core/src/services/webhdfs/backend.rs index 4b6757d3bae9..75d2240b1e5c 100644 --- a/core/src/services/webhdfs/backend.rs +++ b/core/src/services/webhdfs/backend.rs @@ -527,6 +527,8 @@ impl Access for WebhdfsBackend { .set_root(&self.root) .set_native_capability(Capability { stat: true, + stat_has_content_length: true, + stat_has_last_modified: true, read: true, @@ -538,6 +540,8 @@ impl Access for WebhdfsBackend { delete: true, list: true, + list_has_content_length: true, + list_has_last_modified: true, shared: true, diff --git a/core/src/services/yandex_disk/backend.rs b/core/src/services/yandex_disk/backend.rs index 491efd9f8104..cedde53e9a85 100644 --- a/core/src/services/yandex_disk/backend.rs +++ b/core/src/services/yandex_disk/backend.rs @@ -161,6 +161,10 @@ impl Access for YandexDiskBackend { .set_root(&self.core.root) .set_native_capability(Capability { stat: true, + stat_has_last_modified: true, + stat_has_content_md5: true, + stat_has_content_type: true, + stat_has_content_length: true, create_dir: true, @@ -175,6 +179,10 @@ impl Access for YandexDiskBackend { list: true, list_with_limit: true, + list_has_last_modified: true, + list_has_content_md5: true, + list_has_content_type: true, + list_has_content_length: true, shared: true,