resolvePath static method
Implementation
static resolvePath(String path) {
final regX = RegExp(r'projects/.+/databases/.+/documents/');
path = path.replaceFirst(regX, './documents/'); // *.......*
if (path.startsWith('./documents/')) return path; // *.....*
return './documents/${path.replaceFirst(RegExp(r'\A/'), '')}';
}