# Path: linux_story/common.py
# def get_max_challenge_number():
# def get_username():
# def get_story_file(name):


import filecmp
import os
import shutil
import stat
import errno
from linux_story.common import fake_home_dir, tq_file_system, get_story_file
            path = os.path.join(root, f)
            os.chmod(path, 0644)


def get_oct_permissions(path):
    return oct(os.stat(path).st_mode & 0777)


def get_int_permissions(path):
    return int(os.stat(path).st_mode & 0777)


def delete_items(items):
    if not items:
        return

    for path in items:
        real_path = os.path.expanduser(path.replace('~', fake_home_dir))
        delete_item(real_path)


def modify_permissions(fake_path, permission):
    real_path = os.path.expanduser(fake_path.replace('~', fake_home_dir))
    os.chmod(real_path, permission)


def modify_file_tree(items):
    if not items:
        return


# Path: linux_story/common.py
# def get_max_challenge_number():
# def get_username():
# def get_story_file(name):


# Path: linux_story/file_creation/FileTree.py
import filecmp
import os
import shutil
import stat
import errno
from linux_story.common import fake_home_dir, tq_file_system, get_story_file

            path = os.path.join(root, f)
            os.chmod(path, 0644)


def get_oct_permissions(path):
    return oct(os.stat(path).st_mode & 0777)


def get_int_permissions(path):
    return int(os.stat(path).st_mode & 0777)


def delete_items(items):
    if not items:
        return

    for path in items:
        real_path = os.path.expanduser(path.replace('~', fake_home_dir))
        delete_item(real_path)


def modify_permissions(fake_path, permission):
    real_path = os.path.expanduser(fake_path.replace('~', fake_home_dir))
    os.chmod(real_path, permission)


def modify_file_tree(items):
    if not items:
        return


    file_tree = FileTree(None, tq_file_system)