def generate_sub_created_events(src_dir_path):
 for (root, directories, filenames) in os.walk(src_dir_path):
  for directory in directories:
   (yield DirCreatedEvent(os.path.join(root, directory)))
  for filename in filenames:
   (yield FileCreatedEvent(os.path.join(root, filename)))

def generate_sub_created_events ( src_dir_path ) : for ( root , directories , filenames ) in os . walk ( src_dir_path ) : for directory in directories : ( yield DirCreatedEvent ( os . path . join ( root , directory ) ) ) for filename in filenames : ( yield FileCreatedEvent ( os . path . join ( root , filename ) ) )
generates an event list of :class:dircreatedevent and :class:filecreatedevent objects for all the files and directories within the given moved directory that were moved along with the directory .