func (s *CpusetGroup) ensureParent(current, root string) error {
	parent := filepath.Dir(current)
	if filepath.Clean(parent) == root {
		return nil
	}
	if err := s.ensureParent(parent, root); err != nil {
		return err
	}
	if err := os.MkdirAll(current, 0755); err != nil && !os.IsExist(err) {
		return err
	}
	return s.copyIfNeeded(current, parent)
}
func (s *CpusetGroup) ensureParent(current, root string) error {
	parent := filepath.Dir(current)
	if filepath.Clean(parent) == root {
		return nil
	}
	if err := s.ensureParent(parent, root); err != nil {
		return err
	}
	if err := os.MkdirAll(current, 0755); err != nil && !os.IsExist(err) {
		return err
	}
	return s.copyIfNeeded(current, parent)
}
func ( s * CpusetGroup ) ensureParent ( current , root string ) error { parent := filepath . Dir ( current ) if filepath . Clean ( parent ) == root { return nil } if err := s . ensureParent ( parent , root ) ; err != nil { return err } if err := os . MkdirAll ( current , 0755 ) ; err != nil && ! os . IsExist ( err ) { return err } return s . copyIfNeeded ( current , parent ) }
// ensureParent makes sure that the parent directory of current is created
// and populated with the proper cpus and mems files copied from
// it's parent.
ensureParent makes sure that the parent directory of current is created and populated with the proper cpus and mems files copied from it s parent .