version 1.5, 2005/02/11 17:01:22
|
version 1.6, 2005/02/11 20:06:57
|
Line 1
|
Line 1
|
import os |
import os |
import os.path |
import os.path |
import stat |
import stat |
|
import OSAS_helpers |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Globals import InitializeClass,package_home |
from Globals import InitializeClass,package_home |
from OFS.SimpleItem import SimpleItem |
from OFS.SimpleItem import SimpleItem |
Line 70 class OSAS_storeOnlineServer(SimpleItem)
|
Line 71 class OSAS_storeOnlineServer(SimpleItem)
|
|
|
def isfile(self,path=""): |
def isfile(self,path=""): |
"""list dir""" |
"""list dir""" |
return os.path.isdir(path) |
return os.path.isfile(path) |
|
|
|
|
|
|
Line 88 class OSAS_storeOnlineServer(SimpleItem)
|
Line 89 class OSAS_storeOnlineServer(SimpleItem)
|
|
|
return ret |
return ret |
|
|
|
def getAllIndexMetasOfSubDirs(self,path): |
|
"""get all index Metas""" |
|
ret={} |
|
if os.path.exists(path+"/index.meta"): |
|
ret["."]=file(path+"/index.meta","r").read() |
|
for dir in os.listdir(path): |
|
fileType=OSAS_helpers.checkOSASFileType(os.path.join(path,dir)) |
|
if os.path.exists(os.path.join(path,dir,"index.meta")): |
|
ret[dir]=('OSAS_dir',file(os.path.join(path,dir,"index.meta"),"r").read()) |
|
else: |
|
ret[dir]=(fileType,None) |
|
return ret |
|
|
|
|
|
|
def manage_addOSAS_storeOnlineServerForm(self): |
def manage_addOSAS_storeOnlineServerForm(self): |
"""interface for adding the OSAS_storeOnline""" |
"""interface for adding the OSAS_storeOnline""" |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addStoreOnlineServer.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addStoreOnlineServer.zpt')).__of__(self) |