# create a folder called 'externalfiles'
# using ScriptableTypeinfo
portal.externalfiles.invokeFactory('topfolder', repository='default',
                                   path='tests/topfolder')
assert 'folder1' in portal.topfolder.contentIdS()

# now ensure that passing in a invalid repository throws a exception

# ensure that adding a relative path doesnt escape otu of the repository
files.invokeFactory('somefolder', repository='default', path='../../passwd')

# get the tool to see if there are any differences from ODB/FS
# the tool should check a folder on down
obj = files.topfolder.folder1.content11
path = obj.getFullPath()
os.unlink(path)
missing_files = managed_file._compareToFS(files.topfolder)
failUnless(obj.getId() != missing_files[0])

# does import/export work on Managed file.
