@textile/hub > Buckets > removePath
Buckets.removePath() method
Returns information about a bucket path (cannot be undone).
Signature:
removePath(key: string, path: string, options?: RemovePathOptions): Promise<RemovePathResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Unique (IPNS compatible) identifier key for a bucket. |
path | string | A relative path within a bucket. |
options | RemovePathOptions |
Returns:
Promise<RemovePathResponse>
Example
Remove a file by its relative path
import { Buckets } from '@textile/hub'
const remove = async (buckets: Buckets, key: string) => {
buckets.remove(key)
}