localpdb/utils/os.py
def create_directory(path):
    """
    Creates directory with additional verbosity and checks
    @param path: path to the created directory
    @return: True if created properly
    """
    path = Path(path)
    if path.is_dir():
        return True
    else:
        try:
            path.mkdir()
        except PermissionError:
            logger.error(f'No write permission in directory: \'{path}\'.')
            sys.exit(1)
        except FileExistsError:
            logger.error(f'Cannot create directory: \'{path}\' - file with this name already exist.')
            sys.exit(1)

    Creates directory with additional verbosity and checks
    @param path: path to the created directory
    @return: True if created properly
    
Creates directory with additional verbosity and checks
Creates directory with additional verbosity and checks
def create_directory(path):
    path = Path(path)
    if path.is_dir():
        return True
    else:
        try:
            path.mkdir()
        except PermissionError:
            logger.error(f'No write permission in directory: \'{path}\'.')
            sys.exit(1)
        except FileExistsError:
            logger.error(f'Cannot create directory: \'{path}\' - file with this name already exist.')
            sys.exit(1)
def create_directory ( path ) : path = Path ( path ) if path . is_dir ( ) : return True else : try : path . mkdir ( ) except PermissionError : logger . error ( f'No write permission in directory: \'{path}\'.' ) sys . exit ( 1 ) except FileExistsError : logger . error ( f'Cannot create directory: \'{path}\' - file with this name already exist.' ) sys . exit ( 1 )
Creates directory with additional verbosity and checks
Creates directory with additional verbosity and checks
"""
    Creates directory with additional verbosity and checks
    @param path: path to the created directory
    @return: True if created properly
    """
True if created properly
True if created properly
path
path to the created directory
path to the created directory