New in package 167
Syntax
var file = FileSystem.file( path );
Description
Represents a file object; can be passed to any function expecting an Input Stream.
Properties
See FileSystem.Entry object and Input Stream properties.
Methods
Method | Returns | Description |
---|---|---|
copyTo( location [, options ] ) | File | Moves the file into the specified destination. |
[moveTo]( location [, options ] ) | File | Moves the file into the specified destination. |
[rename]( newName [, options ] ) | File | Renames the file. |
[delete]( [ options ] ) | Deletes the file. | |
[write]( string-or-stream ) | Writes a string or content of an input stream into the file. | |
open( [ params ] ) | File | Opens the file in exclusive mode and keeps it open until the end of the current request or task. Concurrent reading from the same file is allowed. Concurrent writing to the same file fails. |
See also Input Stream and [Error Handling] methods.