#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#

import sys
import zipfile

if not sys.argv[1]:
    print "pisi file name required..."
    sys.exit()

if not zipfile.is_zipfile(sys.argv[1]):
    print "ZIP file required..."
    sys.exit()

f = zipfile.ZipFile(sys.argv[1], "r")

for file in f.namelist():
    if f.getinfo(file).external_attr == 2716663808:
        print file + " --> symlink"
    else:
        print file
    
