1
## Script (Python) "metatypes"
2
##bind container=container
6
##bind subpath=traverse_subpath
10
obj = context.aq_parent
12
if obj.meta_type == 'Z Class':
13
return obj.objectMap()
14
elif obj.meta_type in ('Local File System', 'Local Directory'):
15
for f in obj.fileValues():
16
if f.type == 'directory':
17
l.append('LocalFS::directory')
19
l.append('LocalFS::file')
20
# pretend that users are subobjects with meta_types
21
elif obj.meta_type == 'User Folder':
22
return ['User'] * _.len(obj.getUserNames())
24
for f in obj.objectValues():
25
try: l.append(f.meta_type)
26
except: l.append('Broken Because Product is Gone')
1
## Script (Python) "metatypes"
2
##bind container=container
6
##bind subpath=traverse_subpath
10
obj = context.aq_parent
12
if obj.meta_type == 'Z Class':
13
return obj.objectMap()
14
elif obj.meta_type in ('Local File System', 'Local Directory'):
15
for f in obj.fileValues():
16
if f.type == 'directory':
17
l.append('LocalFS::directory')
19
l.append('LocalFS::file')
20
# pretend that users are subobjects with meta_types
21
elif obj.meta_type == 'User Folder':
22
return ['User'] * _.len(obj.getUserNames())
24
for f in obj.objectValues():
25
try: l.append(f.meta_type)
26
except: l.append('Broken Because Product is Gone')