6 from sfa.trust.gid import *
9 def __init__(self, dir):
12 # create the directory to hold the files
14 os.makedirs(self.basedir)
15 # if the path already exists then pass
16 except OSError, (errno, strerr):
20 def add_gid(self, gid):
21 fn = os.path.join(self.basedir, gid.get_hrn() + ".gid")
27 file_list = os.listdir(self.basedir)
28 for gid_file in file_list:
29 fn = os.path.join(self.basedir, gid_file)
30 if os.path.isfile(fn):
31 gid = GID(filename = fn)
35 def get_file_list(self):
38 file_list = os.listdir(self.basedir)
39 for gid_file in file_list:
40 fn = os.path.join(self.basedir, gid_file)
41 if os.path.isfile(fn):
42 gid_file_list.append(fn)