MongoGridFSFile::getSize
MongoGridFSCursor
MongoGridFSFile
PHP Manual

# MongoGridFSFile::write

(PECL mongo >=0.9.0)

MongoGridFSFile::write — Writes this file to the filesystem

### Descrição

public int MongoGridFSFile::write ([ string `$filename` = `NULL` ] )

### Parâmetros

`filename`

  The location to which to write the file. If none is given, the stored filename will be used.

### Valor Retornado

Returns the number of bytes written.

### Exemplos

Exemplo #1 MongoGridFSFile::write example

`<?php
$images = $db->my_db->getGridFS('images');
$image = $images->findOne('jwage.png');
$image->write('/path/to/write/jwage.png');
?>`

MongoGridFSFile::getSize
MongoGridFSCursor
MongoGridFSFile
PHP Manual