createRelative method

  1. @override
FileSystemResource createRelative(
  1. String relativePath
)
override

The file at relativePath from this file's directory, such as a sibling; relativePath may contain ...

Implementation

@override
FileSystemResource createRelative(String relativePath) {
  final slash = path.lastIndexOf('/');
  final parent = slash < 0 ? '' : path.substring(0, slash + 1);
  return FileSystemResource('$parent$relativePath');
}