File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ # File
2
+
3
+ ## ` mimeType `
4
+
5
+ Generate a random MIME-type ` string ` .
6
+
7
+ ``` php
8
+ $faker->mimeType();
9
+
10
+ // 'application/vnd.ms-artgalry', 'application/mods+xml', 'video/x-sgi-movie'
11
+ ```
12
+
13
+ ## ` fileExtension `
14
+
15
+ Generate a random file extension type ` string ` .
16
+
17
+ ``` php
18
+ $faker->fileExtension();
19
+
20
+ // 'deb', 'mp4s', 'uvg'
21
+ ```
22
+
23
+ ## ` file `
24
+
25
+ Copy a random file from the source directory to the target directory and return the filename / relative path.
26
+
27
+ ``` php
28
+ $faker->file('docs', 'site', true);
29
+
30
+ // 'site/f6df6c74-2884-35c7-b802-6f96cf2ead01.md', 'site/423cfca4-709c-3942-8d66-34b08affd90b.md', 'site/c7a76943-e2cc-3c99-b75b-ac2df15cb3cf.md'
31
+
32
+ $faker->file('docs', 'site', false);
33
+
34
+ // 'c4cdee40-0eee-3172-9bca-bdafbb743c17.md', '88aef77e-040d-39a3-8f88-eca522f759ba.md', 'ecbee0e9-6fad-397b-88fb-d84704c7a71c.md'
35
+ ```
36
+
Original file line number Diff line number Diff line change 92
92
- formatters/user-agent.md
93
93
- formatters/payment.md
94
94
- formatters/color.md
95
+ - formatters/file.md
95
96
- ' Locales ' : *locales
96
97
- third-party.md
97
98
You can’t perform that action at this time.
0 commit comments