Sha256: f9fdc9c73ccb369b4d8e64b94d2861a86b4186f9e2060062280a6b98306896df
Contents?: true
Size: 958 Bytes
Versions: 1
Compression:
Stored size: 958 Bytes
Contents
# Faker::File Available since version 1.6.4. ```ruby Faker::File.extension #=> "mp3" Faker::File.mime_type #=> "application/pdf" # Keyword arguments: dir, name, extension, directory_separator Faker::File.file_name(dir: 'path/to') #=> "path/to/something_random.jpg" Faker::File.file_name(dir: 'foo/bar', name: 'baz') #=> "foo/bar/baz.zip" Faker::File.file_name(dir: 'foo/bar', name: 'baz', ext: 'doc') #=> "foo/bar/baz.doc" Faker::File.file_name(dir: 'foo/bar', name: 'baz', ext: 'mp3', directory_separator: '\\') #=> "foo/bar\\baz.mp3" # Keyword arguments: segment_count, root, directory_separator Faker::File.dir #=> "et_error/sint_voluptas/quas_veritatis" Faker::File.dir(segment_count: 2) #=> "ea-suscipit/ut-deleniti" Faker::File.dir(segment_count: 3, root: nil, directory_separator: '/') #=> "est_porro/fugit_eveniet/incidunt-autem" Faker::File.dir(segment_count: 3, root: nil, directory_separator: '\\') #=> "aut-ullam\\quia_quisquam\\ut-eos" ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
logstash-output-scalyr-0.1.7 | vendor/bundle/jruby/2.5.0/bundler/gems/faker-e1bd4a5a5777/doc/default/file.md |