Returns the relative version of a filename.
ResourceInterface $file The file:
ResourceInterface $directory The directory:
string The name to compare with files from other directories
protected function getRelativeName(ResourceInterface $file, ResourceInterface $directory) {
return substr((string) $file, strlen((string) $directory));
}