Generate a random path to user's folders.

        :return: Path.

        :Example:
            /home/taneka/Pictures
436983
def users_folder(self) -> str:
        
        user = self.user()
        folder = self.random.choice(FOLDERS)
        return str(self._pathlib_home / user / folder)
542877
def filepaths(self):
        
        return nativestring(self._filepathEdit.text()).split(os.path.pathsep)
337238
def make_user_config_dir():
    
    config_path = get_user_config_dir()

    if not user_config_dir_exists():
        try:
            os.mkdir(config_path)
            os.mkdir(os.path.join(config_path, 'hooks.d'))
        except OSError:
            return None

    return config_path
1086686
def file_path(self, depth=1, category=None, extension=None):
        
        file = self.file_name(category, extension)
        path = "/{0}".format(file)
        for _ in range(0, depth):
            path = "/{0}{1}".format(self.generator.word(), path)
        return path
114495
def path(*components):
    
    _path = os.path.join(*components)
    _path = os.path.expanduser(_path)

    return _path
684309
def get_image_file_path(instance, filename):
    """"""
    ext = filename.split('.')[-1]
    filename = '%s.%s' % (uuid.uuid4(), ext)
    return os.path.join(
        'user_media', str(instance.user.pk), 'images', filename)
231337
def create_directory(self, path=None):
        
        if path is None:
            path = self.get_path()
        if not os.path.exists(path):
            os.makedirs(path)
385614
def addImagePath(new_path):
    
    if os.path.exists(new_path):
        Settings.ImagePaths.append(new_path)
    elif "http://" in new_path or "https://" in new_path:
        request = requests.get(new_path)
        if request.status_code < 400:
            # Path exists
            Settings.ImagePaths.append(new_path)
        else:
            raise OSError("Unable to connect to " + new_path)
    else:
        raise OSError("File not found: " + new_path)
1148104
def get_directories(self, request):
        

        queryset = self.folder.media_folder_children.all().order_by(*config.MEDIA_FOLDERS_ORDER_BY.split(","))

        paginator = Paginator(queryset, self.objects_per_page)

        page = request.GET.get('page', None)

        try:
            object_list = paginator.page(page)
        except PageNotAnInteger:

            if page == "all":
                object_list = queryset
            else:
                object_list = paginator.page(1)

        except EmptyPage:
            object_list = paginator.page(paginator.num_pages)

        return object_list
115887
def create_gallery_folder(self, folder_name, scope='content/write'):
        
        return _post(
            token=self.oauth.get_user_token(scope),
            uri='/user/media/' + urllib.quote(folder_name)
        )
100363
def build_path(levels):
    
    path = os.path.join(*levels)
    if not dir_exists(path):
        os.makedirs(path)
    return path
29365
def home_dir():
    '''
    
    '''
    if os.name == 'nt':
        from win32com.shell import shell, shellcon

        return shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0)
    else:
        return os.path.expanduser('~')
250751
public function generateRandomFilePath()
    {
        do {
            $file = sys_get_temp_dir().
                '/graphviz-'.sha1(uniqid('graphviz-image-', true).time().rand(0, 9999)).'.png';
        } while (is_file($file));

        return $file;
    }
726206
def make_directory(self, directory_name, *args, **kwargs):
		
		previous_path = self.session_path()
		try:
			self.session_path(directory_name)
			os.mkdir(self.full_path())
		finally:
			self.session_path(previous_path)
1229362
def get_folders(self):
        
        path = 'folders/list'
        response = self.request(path)
        items = response['data']
        folders = []
        for item in items:
            if item.get('type') == 'error':
                raise Exception(item.get('message'))
            elif item.get('type') == 'folder':
                folders.append(Folder(self, **item))
        return folders
1174267
def calculate_path(self, remote_path, input_type):
        
        directory, allow_nested_files = self._directory_for_file_type(input_type)
        path = get_mapped_file(directory, remote_path, allow_nested_files=allow_nested_files)
        return path
364256
def _get_path(self, n):
        
        d = self.local_dirs[n % len(self.local_dirs)]
        if not os.path.exists(d):
            os.makedirs(d)
        return os.path.join(d, str(n))