# qcow2_snapshot_list

List all snapshots in a qcow2 disk image.

```rhai
qcow2_snapshot_list(path) -> Array
```

## Parameters

- `path` (string): Path to the qcow2 image

## Returns

Returns an array of snapshot maps.

## Examples

```rhai
let snapshots = qcow2_snapshot_list("/vms/disk1.qcow2");

for snap in snapshots {
    print("Snapshot: " + snap.name);
    
    if snap.id != () {
        print("  ID: " + snap.id);
    }
    
    if snap.vm_state_size != () {
        print("  VM State Size: " + snap.vm_state_size);
    }
    
    if snap.date_sec != () {
        print("  Date: " + snap.date_sec);
    }
}
```

## Snapshot Structure

Each snapshot map contains:
- `id`: Snapshot ID (optional)
- `name`: Snapshot name (optional)
- `vm_state_size`: VM state size if saved (optional)
- `date_sec`: Creation date in seconds (optional)
- `date_nsec`: Creation date nanoseconds (optional)
- `vm_clock_nsec`: VM clock in nanoseconds (optional)

## Notes

- Returns empty array if no snapshots exist
- Fields may be unit (()) if not available
- Use to check existing snapshots before creating or deleting
