@pnp/sp
Version:
pnp - provides a fluent api for working with SharePoint REST
13 lines • 569 B
JavaScript
import { encodePath } from "../utils/encode-path-str.js";
import { _Web } from "../webs/types.js";
import { File, fileFromServerRelativePath } from "./types.js";
_Web.prototype.getFileByServerRelativePath = function (fileRelativeUrl) {
return fileFromServerRelativePath(this, fileRelativeUrl);
};
_Web.prototype.getFileById = function (uniqueId) {
return File(this, `getFileById('${uniqueId}')`);
};
_Web.prototype.getFileByUrl = function (fileUrl) {
return File(this, `getFileByUrl('${encodePath("!@p1::" + fileUrl)}')`);
};
//# sourceMappingURL=web.js.map