fromSnippet() method allows you to create a new sandbox with same file system as previous sandbox using its unique snippet ID. This is useful when you’ve created a sandbox with shouldBackupFilesystem: true and want to resume work without losing files or progress.
fromSnippet(playgroundSnippetId)
Description:
Creates a new sandbox with same file system as previous sandbox using its snippet ID.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| playgroundSnippetId | string | Yes | The snippet ID returned from a previous create() call |
Promise<void> - Resolves when connection is established
Example:
