Search

vRO intrinsic class File

Representation of a file on a managed computer.

Attributes

Name Type Description
directory String Returns the directory in which the file resides.
exists boolean Return true if the descibed by this object exists.
extension String Returns the extension of this file. <p>The extention is the set of characters after the last dot in the filename.</p> <p>Examples: Extension of "fail-over.policy" is "policy". Extension of "file.name.with.points.xyz" is "xyz".</p>
hostname String The hostname of the <a cmd="show.type.Host">Host</a> on which the file resides.
isDir boolean Returns true if this file ("path") is a directory.
isLocal boolean Returns true if the file resides on the same computer as the one running the script.
length Number Returns the file length.
name String The name of this file, not including the full path.
path String The path to the file, not including its name.

Methods

Name Returns
File(String file) constructor
canRead() boolean
canWrite() boolean
createDirectory() void
createFile() void
deleteFile() void
list(Object extension) String[]
renameTo(String destPathName) boolean
write(String content) void

Returned by

Method Returns
System.createTempFile(String suffix) File

Referenced in

None