Ejemplo n.º 1
0
def is_reparse_point(path):
    """
	Determine if the given path is a reparse point.
	Return False if the file does not exist or the file attributes cannot
	be determined.
	"""
    res = api.GetFileAttributes(path)
    return (res != api.INVALID_FILE_ATTRIBUTES
            and bool(res & api.FILE_ATTRIBUTE_REPARSE_POINT))
Ejemplo n.º 2
0
def GetFileAttributes(filepath):
    attrs = api.GetFileAttributes(filepath)
    if attrs == api.INVALID_FILE_ATTRIBUTES:
        raise WindowsError()
    return FileAttributes(attrs)