FileProvider {charlatan} | R Documentation |
file methods
charlatan::BaseProvider
-> FileProvider
locale
(character) the locale
charlatan::BaseProvider$bothify()
charlatan::BaseProvider$check_locale()
charlatan::BaseProvider$lexify()
charlatan::BaseProvider$numerify()
charlatan::BaseProvider$random_digit()
charlatan::BaseProvider$random_digit_not_zero()
charlatan::BaseProvider$random_digit_not_zero_or_empty()
charlatan::BaseProvider$random_digit_or_empty()
charlatan::BaseProvider$random_element()
charlatan::BaseProvider$random_element_prob()
charlatan::BaseProvider$random_int()
charlatan::BaseProvider$random_letter()
charlatan::BaseProvider$randomize_nb_elements()
allowed_locales()
fetch the allowed locales for this provider
FileProvider$allowed_locales()
new()
Create a new FileProvider
object
FileProvider$new(locale = NULL)
locale
(character) the locale to use. See
$allowed_locales()
for locales supported (default: en_US)
A new FileProvider
object
mime_type()
a random mime type
FileProvider$mime_type(category = NULL)
category
(character) a mime type category of mime types, one
of application, audio, image, message, model, multipart, text or
video. default: NULL
file_name()
a random file name
FileProvider$file_name(category = NULL, extension = NULL)
category
(character) a category of file extension type, one of
audio, image, office, text or video. default: NULL
. If this is
given, extension
is ignored
extension
(character) a file extension. if this is given,
category
is ignored.
file_extension()
a random file extension
FileProvider$file_extension(category = NULL)
category
(character) a category of file extension type, one of
audio, image, office, text or video. default: NULL
file_path()
a random file path
FileProvider$file_path(depth = 1, category = NULL, extension = NULL)
depth
(character) depth of the file (depth >= 0). default: 1
category
(character) a category of file extension type, one of
audio, image, office, text or video. default: NULL
. If this is
given, extension
is ignored
extension
(character) a file extension. if this is given,
category
is ignored.
clone()
The objects of this class are cloneable with this method.
FileProvider$clone(deep = FALSE)
deep
Whether to make a deep clone.
(x <- FileProvider$new())
x$locale
x$mime_type()
x$file_extension()
x$file_name()
x$file_path()
x$file_path(depth = 2)
x$file_path(depth = 3)
x$file_path(depth = 6)