---
title: "fileTruncate"
canonical: "https://support.appfire.com/space/PSJC/513900554/fileTruncate"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Clears the content of the specified file. Creates a new file if the one you want to clear content for doesn’t exist.

Clears the content of the specified file.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | truncate(path_to_file) | **Package** | file |
| **Alias** |  | **Pkg Usage** | truncate(path_to_file) |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| path_to_file | String | Yes | Name of the file you want to truncate. |

## Return Type

**Boolean**

Returns true if the file is truncated.

## Example

### Example 1

```javascript
use "file";
truncate("fileToTruncate.txt");
```

## See also

> Macro (contentbylabel)