`Vault.trash`を使う。第2引数 `system` を `true` にすれば、[[Obsidian]]のゴミ箱の代わりに[[OS]]のゴミ箱を使う。 ```ts export class Vault extends Events { /** * Tries to move to system trash. If that isn't successful/allowed, use local trash * @param file - The file or folder to be deleted * @param system - Set to `false` to use local trash by default. * @public */ trash(file: TAbstractFile, system: boolean): Promise<void>; } ``` ```ts app.vault.trash(file) ```