Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/sp/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,17 @@ import "@pnp/sp/files";
const sp = spfi(...);
const user = await sp.web.getFolderByServerRelativePath("{folder relative path}").files.getByUrl("name.txt").getLockedByUser();
```
### recycle

Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.

```TypeScript
import { spfi } from "@pnp/sp";
import "@pnp/sp/webs";
import "@pnp/sp/files";

const sp = spfi(...);

const item = await sp.web.getFolderByServerRelativePath("{folder relative path}").files.getByUrl("name.txt").recycle();

```