Skip to content

Commit 63fb985

Browse files
authored
PHPLIB-1324 Implement rename for GridFS stream wrapper (#1207)
Optimize rename using a single updateMany command instead of doing the implementation suggested in the spec https://github.com/mongodb/specifications/blob/0b47194538aa817978fae0f77f684f6d5e62ebab/source/gridfs/gridfs-spec.rst#renaming-stored-files
1 parent d1ed05a commit 63fb985

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/reference/method/MongoDBGridFSBucket-registerGlobalStreamWrapperAlias.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ Supported stream functions:
4747
- :php:`filemtime() <filemtime>`
4848
- :php:`filesize() <filesize>`
4949
- :php:`file() <file>`
50-
- :php:`fopen() <fopen>` (with "r", "rb", "w", and "wb" modes)
50+
- :php:`fopen() <fopen>` with "r", "rb", "w", and "wb" modes
51+
- :php:`rename() <rename>` rename all revisions of a file in the same bucket
5152

5253
In read mode, the stream context can contain the option ``gridfs['revision']``
5354
to specify the revision number of the file to read. If omitted, the most recent

0 commit comments

Comments
 (0)