MCPcopy Index your code
hub / github.com/codedogQBY/ReadAny / parseBookFolderName

Function parseBookFolderName

packages/core/src/sync/sync-naming.ts:61–67  ·  view source on GitHub ↗
(folderName: string)

Source from the content-addressed store, hash-verified

59 * Returns null when the trailing 36 chars do not match a UUID-v4-shaped string.
60 */
61export function parseBookFolderName(folderName: string): string | null {
62 if (folderName.length < 37) return null;
63 const candidateId = folderName.slice(-36);
64 if (!UUID_RE.test(candidateId)) return null;
65 if (folderName[folderName.length - 37] !== "-") return null;
66 return candidateId;
67}
68
69/** Heuristic: file is a cover if its extension is a known image format. */
70export function isCoverFileName(fileName: string): boolean {

Callers 5

loadRemoteListingsFunction · 0.90
downloadBookFileFunction · 0.90
mapVirtualPathMethod · 0.90
listDirMethod · 0.90

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected