MCPcopy
hub / github.com/ollm/OpenComic / getTypeAdress

Function getTypeAdress

scripts/server-client.js:57–67  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

55}
56
57function getTypeAdress(path)
58{
59 path = posixPath(path);
60
61 if(/^(?:smb|s3)\:\//.test(path))
62 return app.extract(/^((?:smb|s3)\:\/\/[^\/\\]+\/[^\/\\]+)/, path, 1);
63 else if(/^(?:ftps?|sftp|ssh|scp|webdavs?|opdsfs?)\:\//.test(path))
64 return app.extract(/^((?:ftps?|sftp|ssh|scp|webdavs?|opdsfs?)\:\/\/[^\/\\]+)/, path, 1);
65
66 return '';
67}
68
69function posixPath(path)
70{

Callers 2

readFunction · 0.85
downloadFunction · 0.85

Calls 1

posixPathFunction · 0.70

Tested by

no test coverage detected