Skip to content

Commit 507e6a6

Browse files
committed
fix: correct write_files docstring about directory auto-creation
The docstring incorrectly stated that writing to a non-existing directory would produce an error. The backend auto-creates parent directories, as confirmed by existing tests and consistent with the write() docstring.
1 parent fcb95c3 commit 507e6a6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/python-sdk/e2b/sandbox_async/filesystem/filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ async def write_files(
237237
Writes a list of files to the filesystem.
238238
When writing to a file that doesn't exist, the file will get created.
239239
When writing to a file that already exists, the file will get overwritten.
240-
When writing to a file that's in a directory that doesn't exist, you'll get an error.
240+
When writing to a file at path that doesn't exist, the necessary directories will be created.
241241
242242
:param files: list of files to write as `WriteEntry` objects, each containing `path` and `data`
243243
:param user: Run the operation as this user

packages/python-sdk/e2b/sandbox_sync/filesystem/filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def write_files(
233233
Writes a list of files to the filesystem.
234234
When writing to a file that doesn't exist, the file will get created.
235235
When writing to a file that already exists, the file will get overwritten.
236-
When writing to a file that's in a directory that doesn't exist, you'll get an error.
236+
When writing to a file at path that doesn't exist, the necessary directories will be created.
237237
238238
:param files: list of files to write as `WriteEntry` objects, each containing `path` and `data`
239239
:param user: Run the operation as this user

0 commit comments

Comments
 (0)