appendName static method

String appendName(
  1. String path,
  2. String append
)

Implementation

static String appendName(String path, String append) {
  path = sanitize(path);
  String name = path.split('/').last;
  List<String> seg = name.split('.');
  seg[0] = seg[0] + append;
  return join(parentOf(path), seg.join('.'));
}