MCPcopy Create free account
hub / github.com/experdot/pointer / checkFolderNameConflict

Function checkFolderNameConflict

src/renderer/src/services/pagesService.ts:193–204  ·  view source on GitHub ↗
(
  folderId: string,
  targetFolderId: string | undefined
)

Source from the content-addressed store, hash-verified

191
192// 检查文件夹在目标文件夹是否重名
193export function checkFolderNameConflict(
194 folderId: string,
195 targetFolderId: string | undefined
196): string | null {
197 const { folder } = stores
198 const movingFolder = folder.getById(folderId)
199 if (!movingFolder) return null
200
201 const siblingFolders = folder.findByParentId(targetFolderId)
202 const conflict = siblingFolders.find((f) => f.id !== folderId && f.name === movingFolder.name)
203 return conflict ? movingFolder.name : null
204}
205
206// 移动页面到文件夹(带重名检查)
207export async function movePage(

Callers

nothing calls this directly

Calls 2

findByParentIdMethod · 0.80
getByIdMethod · 0.65

Tested by

no test coverage detected