driver-legacy/src/main/com/mongodb/gridfs/GridFS.java
public GridFSInputFile createFile(final File file) throws IOException {
        return createFile(new FileInputStream(file), file.getName(), true);
    }
public GridFSInputFile createFile(final File file) throws IOException {
        return createFile(new FileInputStream(file), file.getName(), true);
    }
public GridFSInputFile createFile ( final File file ) throws IOException { return createFile ( new FileInputStream ( file ) , file . getName ( ) , true ) ; }
Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}.

@param file the file object
@return a GridFS input file
@throws IOException if there are problems reading {@code file}
Creates a file entry . After calling this method you have to call { @link com . mongodb . gridfs . GridFSInputFile#save () } .