public function getFileDirectory(IFile $file): string
    {
        return implode(DIRECTORY_SEPARATOR, array_filter([
            $this->directory,
            // TODO: check if used correct hash.
            // Which value should be passed into getDirectoryHash? Directory name or file id?
            $this->getDirectoryHash((string) $file->getId()),
        ]));
    }