Documentation

FileExtension extends Extension

An extension is the only way to add new functionality to Faker.

Tags
experimental

This interface is experimental and does not fall under our BC promise

Table of Contents

extension()  : string
Get a random file extension (without a dot)
filePath()  : string
Get a full path to a new real file on the system.
mimeType()  : string
Get a random MIME type

Methods

extension()

Get a random file extension (without a dot)

public extension() : string
Tags
example

avi

Return values
string

filePath()

Get a full path to a new real file on the system.

public filePath() : string
Return values
string

mimeType()

Get a random MIME type

public mimeType() : string
Tags
example

'video/avi'

Return values
string

Search results