def _options_dir(name):
 _check_portname(name)
 _root = '/var/db/ports'
 new_dir = os.path.join(_root, name.replace('/', '_'))
 old_dir = os.path.join(_root, name.split('/')[(-1)])
 if os.path.isdir(old_dir):
  return old_dir
 return new_dir

def _options_dir ( name ) : _check_portname ( name ) _root = '/var/db/ports' new_dir = os . path . join ( _root , name . replace ( '/' , '_' ) ) old_dir = os . path . join ( _root , name . split ( '/' ) [ ( - 1 ) ] ) if os . path . isdir ( old_dir ) : return old_dir return new_dir
retrieve the path to the dir containing options file for a given port .