Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
fileTruncatetruncate(path_to_file) | Package | file | Alias | | Pkg Usage | truncate(path_to_file) |
|
Description
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. Creates a new file if the one you want to clear content for doesn’t exist.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
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
Code Block |
---|
|
use "file";
truncate("fileToTruncate.txt");
fileTruncate("fileToTruncate.txt"); |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "file_ |
---|
|
...
function" and space = currentSpace ( ) | labels | array_ |
---|
|
...