absolutePathFromRelative method

String absolutePathFromRelative(
  1. String relativePath
)

Implementation

String absolutePathFromRelative(String relativePath) {
  final path = relativePath.trim();

  if (path.isEmpty || path.startsWith('/')) {
    return '$rootPath'
        '$path';
  } else {
    return '$rootPath'
        '/'
        '$path';
  }
}