getMemoryPath method

String getMemoryPath(
  1. MemoryType memoryType, {
  2. String? managedFilePath,
})

Implementation

String getMemoryPath(MemoryType memoryType, {String? managedFilePath}) {
  return switch (memoryType) {
    MemoryType.user => p.join(configHomeDir, 'NEOMAGE.md'),
    MemoryType.local => p.join(cwd, 'NEOMAGE.local.md'),
    MemoryType.project => p.join(cwd, 'NEOMAGE.md'),
    MemoryType.managed => p.join(
      managedFilePath ?? p.join(configHomeDir, 'managed'),
      'NEOMAGE.md',
    ),
    MemoryType.autoMem => p.join(configHomeDir, 'auto', 'NEOMAGE.md'),
  };
}