> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vessl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Volume (Deprecated)

<Warning>
  The `volume` functions have been deprecated.
  Please use the `vessl.storage` package for managing VESSL storage volumes.
</Warning>

### read\_volume\_file

```python theme={null}
vessl.read_volume_file(
   volume_id: int, path: str
)
```

Read a file in the volume.

**Args**

* `volume_id` (int) : Volume ID.
* `path` (str) : Path within the volume.

**Example**

```python theme={null}
vessl.read_volume_file(
    volume_id=123456,
    path="train.csv",
)
```

***

## list\_volume\_files

```python theme={null}
vessl.list_volume_files(
   volume_id: int, need_download_url: bool = False, path: str = '',
   recursive: bool = False
)
```

List files in the volume.

**Args**

* `volume_id` (int) : Volume ID.
* `need_download_url` (bool) : True if you need a download URL, False
  otherwise. Defaults to False.
* `path` (str) : Path within the volume. Defaults to root.
* `recursive` (bool) : True if list files recursively, False otherwise.
  Defaults to False.

**Example**

```python theme={null}
vessl.list_volume_files(
    volume_id=123456,
)
```

***

## create\_volume\_file

```python theme={null}
vessl.create_volume_file(
   volume_id: int, is_dir: bool, path: str
)
```

Create file in the volume.

**Args**

* `volume_id` (int) : Volume ID.
* `is_dir` (bool) : True if a file is directory, False otherwise.
* `path` (str) : Path within the volume.

**Example**

```python theme={null}
vessl.create_volume_file(
    volume_id=123456,
    is_dir=False,
    path="models"
)
```

***

## delete\_volume\_file

```python theme={null}
vessl.delete_volume_file(
   volume_id: int, path: str
)
```

Delete file in the volume.

**Args**

* `volume_id` (int) : Volume ID.
* `path` (str) : Path within the volume.

**Example**

```python theme={null}
vessl.delete_volume_file(
    volume_id=123456,
    path="model.pth",
)
```

***

## upload\_volume\_file

```python theme={null}
vessl.upload_volume_file(
   volume_id: int, path: str
)
```

Upload file in the volume.

**Args**

* `volume_id` (int) : Volume ID.
* `path` (str) : Local file path to upload

**Example**

```python theme={null}
vessl.upload_volume_file(
    volume_id=123456,
    path="model.pth",
)
```

***

## copy\_volume\_file

```python theme={null}
vessl.copy_volume_file(
   source_volume_id: Optional[int], source_path: str,
   dest_volume_id: Optional[int], dest_path: str, quiet: bool = False
)
```

Copy file either from local to remote, remote to local, or remote to
remote.

**Args**

* `source_volume_id` (Optional\[int]) : Source volume file id. If not
  specified, source is assumed to be local.
* `source_path` (str) : If source\_volume\_id is empty, local source path.
  Otherwise, remote source path.
* `dest_volume_id` (Optional\[int]) : Destination volume file id. If not
  specified, destination is assumed to be local.
* `dest_path` (str) : If dest\_volume\_id is empty, local destination path.
  Otherwise, remote destination path.
* `quiet` (bool) : True if the muted output, False otherwise. Defaults to
  False.

**Example**

```python theme={null}
vessl.copy_volume_file(
    source_volume_id=123456,
    source_path="model.pth",
    dest_volume_id=123457,
    dest_path="model.pth",
)
```
