#NEWLINE# def _SetupFilesystemToTar( self ) : #NEWLINE# #INDENT# 'Creates some directory structure to tar.' #NEWLINE# if os . path . exists ( self . tmp_path ) : #NEWLINE# #INDENT# shutil . rmtree ( self . tmp_path ) #NEWLINE# #UNINDENT# os . makedirs ( self . tmp_path ) #NEWLINE# with open ( ( self . tmp_path + '/test1' ) , 'w' ) as fd : #NEWLINE# #INDENT# ( ( print >> fd ) , 'some text' ) #NEWLINE# #UNINDENT# shutil . copyfile ( ( self . tmp_path + '/test1' ) , ( self . tmp_path + '/test2' ) ) #NEWLINE# os . makedirs ( ( self . tmp_path + '/dir1' ) ) #NEWLINE# os . makedirs ( ( self . tmp_path + '/dir1/dir11' ) ) #NEWLINE# os . makedirs ( ( self . tmp_path + '/dir2' ) ) #NEWLINE# os . makedirs ( ( self . tmp_path + '/dir2/dir1' ) ) #NEWLINE# os . symlink ( ( self . tmp_path + '/test1' ) , ( self . tmp_path + '/dir1/sl1' ) ) #NEWLINE# os . link ( ( self . tmp_path + '/test2' ) , ( self . tmp_path + '/dir1/hl2' ) ) #NEWLINE# os . symlink ( ( self . tmp_path + '/test2' ) , ( self . tmp_path + '/dir2/sl2' ) ) #NEWLINE# os . link ( ( self . tmp_path + '/test1' ) , ( self . tmp_path + '/dir2/hl1' ) )