[File_SetSize] sets the size of the specified file. Accepts two parameters, the name of the file to be modified and the size in bytes which the file should be set to. Any data beyond that size in bytes will be truncated.
The file tags are protected by four different permissions. The user must have permission for all of the following in order to use this tag:
- Permission to use the tag itself.
- Permission to perform the file operation.
- Permission to work in the directory which contains the files.
- The filename extensions of the files which are being worked with must be allowed in Lasso Administration.
[File_SetSize: File Name, File Size]
Use the [File_SetSize] tag. The following example resizes a file named myfile.txt so it contains 0 bytes, effectively erasing the file.
<?LassoScript
File_SetSize: '/myfile.txt', 0;
Output: (File_CurrentError: -ErrorCode) + ': ' + (File_CurrentError);
?>
0: No Error
Tag Link | [File_SetSize] | Category | File |
---|---|---|---|
Type | Process | Data Source | Any |
Support | Preferred | Version | 3.0 |
Output Type | None | Security | Tag,File |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0,LDML3x |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft