예제 #1
0
def restore_junction(old_path, new_path):
    if os.path_exists(new_path):
        if os.path_exists(old_path):
            if junction.isjunction(old_path):
                print("Already junctioned: {}".format(old_path))
            else:
                print("Cannot junction; conflicting folder already exists: {}".format(old_path))
        else:
            link_save(old_path, new_path)
            hide_directory(old_path)
예제 #2
0
def move_and_junction(old_path, new_path):
    if os.path.exists(old_path):
        if not junction.isjunction(old_path):
            if os.path.exists(new_path):
                print("Can't move {}".format(old_path))
                print("Conflicting folder already exists: {}".format(new_path))
                return
            move_save(old_path, new_path)
            link_save(old_path, new_path)
            hide_directory(old_path)
        else:
            print("Already junctioned: {}".format(old_path))
예제 #3
0
def isLink(path):
    return junction.isjunction(path)
예제 #4
0
def isLink(path):
    return junction.isjunction(path)
예제 #5
0
 def is_symlink(source):
     if os.path.isdir(source):
         ret = junction.isjunction(source)
         return ret
     return hardlink.is_hardlink(source)