Skip to content

Commit d4c71f7

Browse files
gautamg795Convex, Inc.
authored and
Convex, Inc.
committed
storage refactor
GitOrigin-RevId: 1c999120e449d56da0e428986796eda82321b13f
1 parent ecb4eeb commit d4c71f7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

crates/application/src/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,11 +2215,11 @@ impl<RT: Runtime> Application<RT> {
22152215
Ok(storage_id)
22162216
}
22172217

2218-
pub async fn get_file(
2218+
pub async fn get_file_entry(
22192219
&self,
22202220
component: ComponentId,
22212221
storage_id: FileStorageId,
2222-
) -> anyhow::Result<FileStream> {
2222+
) -> anyhow::Result<FileStorageEntry> {
22232223
let mut file_storage_tx = self.begin(Identity::system()).await?;
22242224

22252225
let Some(file_entry) = self
@@ -2235,7 +2235,15 @@ impl<RT: Runtime> Application<RT> {
22352235
)
22362236
.into());
22372237
};
2238+
Ok(file_entry)
2239+
}
22382240

2241+
pub async fn get_file(
2242+
&self,
2243+
component: ComponentId,
2244+
storage_id: FileStorageId,
2245+
) -> anyhow::Result<FileStream> {
2246+
let file_entry = self.get_file_entry(component, storage_id).await?;
22392247
self
22402248
.file_storage
22412249
.transactional_file_storage

0 commit comments

Comments
 (0)