Compare commits

..

No commits in common. "a6d67b22afd3073c0db11ee44db788b610ec101d" and "3805d361d75d7ac2670a6d0e2b384a6204c2114b" have entirely different histories.

3 changed files with 2 additions and 14 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartwebdav",
"version": "1.1.0",
"version": "1.0.4",
"private": false,
"description": "A TypeScript library for easy interaction with WebDAV servers, including file and directory management.",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartwebdav',
version: '1.1.0',
version: '1.0.4',
description: 'A TypeScript library for easy interaction with WebDAV servers, including file and directory management.'
}

View File

@ -34,18 +34,6 @@ export class WebdavClient {
return result as plugins.webdav.FileStat[];
}
public async getDirectoryAsSmartfileArray(pathArg: string): Promise<plugins.smartfile.SmartFile[]> {
const directoryListing = await this.listDirectory(pathArg);
const smartfileArray: plugins.smartfile.SmartFile[] = [];
for (const file of directoryListing) {
const fileContents = (await this.wdClient.getFileContents(file.filename, {
format: 'binary',
})) as Buffer;
smartfileArray.push(await plugins.smartfile.SmartFile.fromBuffer(file.filename, fileContents));
}
return smartfileArray;
}
public async ensureDirectory(path: string): Promise<void> {
console.log(`Ensuring directory at ${path}`);
const pathLevels = plugins.smartpath.get.pathLevels(path);