# StudioStorage

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate-studio/trait-studiostorage/

**trait** · [`ferroui-protranslate-studio`](/docs/0.5.0/api/ferroui-protranslate-studio/) · v0.5.0

```rust
trait StudioStorage
```

Relative paths are scoped by the host's storage instance. Writes are atomic:
errors must leave the old destination intact. Missing files are `Ok(None)`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/persistence.rs#L17)

## Members

- [`read`](#function-read)
- [`write_atomic`](#function-write_atomic)
- [`write_new_atomic`](#function-write_new_atomic)
- [`remove`](#function-remove)
- [`list`](#function-list)

<a id="function-read"></a>

### read

```rust
fn read(self: &Self, path: &str) -> Result<Option<Vec<u8>>, StudioError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/persistence.rs#L18)

<a id="function-write_atomic"></a>

### write_atomic

```rust
fn write_atomic(self: &Self, path: &str, bytes: &[u8]) -> Result<(), StudioError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/persistence.rs#L19)

<a id="function-write_new_atomic"></a>

### write_new_atomic

```rust
fn write_new_atomic(self: &Self, path: &str, bytes: &[u8]) -> Result<bool, StudioError>
```

Atomically create a complete file only if absent; false never replaces it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/persistence.rs#L21)

<a id="function-remove"></a>

### remove

```rust
fn remove(self: &Self, path: &str) -> Result<(), StudioError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/persistence.rs#L22)

<a id="function-list"></a>

### list

```rust
fn list(self: &Self, directory: &str) -> Result<Vec<StorageEntry>, StudioError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Studio/persistence.rs#L23)

## Trait implementations

- [`StudioStorage`](/docs/0.5.0/api/ferroui-protranslate-studio/trait-studiostorage/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
