コード例 #1
0
ファイル: systemutils.py プロジェクト: alex-ios/phoshare
def resolve_alias(path):
    """Resolves a path to point to the real file if it is a file system alias.
    """
    try:
        fs, _, _ = FSResolveAliasFile(path, 1)
        return fsdec(fs.as_pathname())
    except (OSError, MacOS.Error) as ose:
        pout(u"Failed to resolve alias for %s." % (path))
        return path
コード例 #2
0
ファイル: systemutils.py プロジェクト: oPromessa/phoshare
def resolve_alias(path):
    """Resolves a path to point to the real file if it is a file system alias.
    """
    try:
        fs, _, _ = FSResolveAliasFile(path, 1)
        return fsdec(fs.as_pathname())
    except (OSError, MacOS.Error) as ose:
        pout(u"Failed to resolve alias for %s." % (path))
        return path
コード例 #3
0
def resolve_alias(path):
    """Resolves a path to point to the real file if it is a file system alias.
    """
    fs, _, _ = FSResolveAliasFile(path, 1)
    return su.fsdec(fs.as_pathname())
コード例 #4
0
ファイル: phoshare_main.py プロジェクト: Suru83/phoshare
def resolve_alias(path):
    """Resolves a path to point to the real file if it is a file system alias.
    """
    fs, _, _ = FSResolveAliasFile(path, 1)
    return su.fsdec(fs.as_pathname())