# Files

SurrealDB allows a bucket to be declared locally or globally to work with files.

_(since v3.0.0)_

Files are accessed by a path, which is prefixed with an `f` to differentiate it from a regular string.

Some examples of file pointers:

```surql
f"bucket:/some/key/to/a/file.txt";
f"bucket:/some/key/with\ escaped";
```

To work with the files that can be accessed through these pointers, use the following:

* A [`DEFINE BUCKET`](/docs/reference/query-language/statements/define/bucket.md) statement to set up the bucket to hold the files
* [Files functions](/docs/reference/query-language/functions/database-functions/file.md) such as `file::put()` and `file::get()`

```surql
DEFINE BUCKET my_bucket BACKEND "memory";
f"my_bucket:/some_file.txt".put("Some text inside");
f"my_bucket:/some_file.txt".get();
<string>f"my_bucket:/some_file.txt".get();
```

```surql title="Output"
-------- Query --------

b"536F6D65207465787420696E73696465"

-------- Query --------

'Some text inside'
```
```
