Repository: joke2k/faker

Issue:
Add a file path provider
In the file providers would be nice to have a file_path provider who would return a path like ```/lorem/ipsum/lorem.pdf```.

Discussion:

Patch:
diff --git a/faker/providers/file/__init__.py b/faker/providers/file/__init__.py
index b19a3c56..4f4c14ce 100644
--- a/faker/providers/file/__init__.py
+++ b/faker/providers/file/__init__.py
@@ -201,3 +201,16 @@ class Provider(BaseProvider):
         """
         category = category if category else cls.random_element(list(cls.file_extensions.keys()))
         return cls.random_element(cls.file_extensions[category])
+
+    @classmethod
+    def file_path(cls, depth=1, category=None, extension=None):
+        """
+        :param category: audio|image|office|text|video
+        :param extension: file extension
+        :param depth: depth of the file (depth >= 0)
+        """
+        file = Provider.file_name(category, extension)
+        path = "/{0}".format(file)
+        for d in range(0, depth):
+            path = "/{0}{1}".format(WordProvider.word(), path)
+        return path


Test patch:
diff --git a/tests/providers/file.py b/tests/providers/file.py
new file mode 100644
index 00000000..1a1617ba
--- /dev/null
+++ b/tests/providers/file.py
@@ -0,0 +1,25 @@
+from __future__ import unicode_literals
+
+import unittest
+import re
+
+from faker import Factory
+from faker.providers.file import Provider as FileProvider
+
+
+class TestFile(unittest.TestCase):
+    """ Tests file """
+
+    def setUp(self):
+        self.factory = Factory.create()
+
+    def test_file_path(self):
+        for _ in range(100):
+            file_path = FileProvider.file_path()
+            self.assertTrue(re.search(r'\/\w+\/\w+\.\w+', file_path))
+            file_path = FileProvider.file_path(depth=3)
+            self.assertTrue(re.search(r'\/\w+\/\w+\/\w+\.\w+', file_path))
+            file_path = FileProvider.file_path(extension='pdf')
+            self.assertTrue(re.search(r'\/\w+\/\w+\.pdf', file_path))
+            file_path = FileProvider.file_path(category='image')
+            self.assertTrue(re.search(r'\/\w+\/\w+\.(bmp|gif|jpeg|jpg|png|tiff)', file_path))