relativePathFromDir function

String relativePathFromDir({
  1. required String directoryPath,
  2. required String path,
})

Returns a relative path from a directoryPath for path

Implementation

String relativePathFromDir({ required String directoryPath, required String path}) => path.replaceAll(directoryPath, "");