Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit b41e0f7

Browse files
Added .file property to item class
1 parent b1998a5 commit b41e0f7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/sharepoint/items.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Queryable, QueryableCollection, QueryableInstance } from "./queryable";
22
import { QueryableSecurable } from "./queryablesecurable";
33
import { Folder } from "./folders";
4+
import { File } from "./files";
45
import { ContentType } from "./contenttypes";
56
import { TypedHash } from "../collections/collections";
67
import { Util } from "../utils/util";
@@ -159,7 +160,15 @@ export class Item extends QueryableSecurable {
159160
*
160161
*/
161162
public get folder(): Folder {
162-
return new Folder(this, "Folder");
163+
return new Folder(this, "folder");
164+
}
165+
166+
/**
167+
* Gets the folder associated with this list item (if this item represents a folder)
168+
*
169+
*/
170+
public get file(): File {
171+
return new File(this, "file");
163172
}
164173

165174
/**

0 commit comments

Comments
 (0)