Aztec® Programming Language

Version 1.0 Alpha

Copyright © 2010-2013

Cold Spring® Development Group

All Rights Reserved

Download Aztec

Site Help

aztec.file.File

public class File from<DirectoryEntry>

Base

DirectoryEntry

File

The File class represents a file entry in an OS file system. It is derived from the DirectoryEntry class, and it provides access to a single file for manipulation (rename, copy, delete) and information (size, modification date, etc.).

File Methods

File() Constructor for the File class
Exists() Virtual method to determine existence of the directory entry object
Rename() Virtual method to rename the directory entry
Delete() Virtual method to delete the directory entry
Size() Returns the size of the actual file in bytes
Copy() Copies the contents of the actual file to another file

Derived Classes

See Also

 


File()

public method File(string Name)

Parameters

Name

Full name of the file

Return Value

None

Description

Constructor for the File class. The full name of the file is passed in (including drive and path).

 

File Class


Exists()

public virtual method<bool> Exists()

Parameters

None

Return Value

True if the item exists

Description

Virtual method to determine existence of the file. If the file exists, it returns true, and if the file does not exist, it returns false.

 

File Class


Rename()

public virtual method<int> Rename(string NewName)

Parameters

NewName

New name for the file

Return Value

Returns 0 if successful

Description

This virtual method renames the file. The new name can either be a local name or a full name (including path). If a local name is provided, the entry is renamed within the same directory. If a full name is provided, the file is renamed and possibly moved to another directory. If successful, the method returns a value of zero.

 

File Class


Delete()

public virtual method<int> Delete()

Parameters

None

Return Value

Returns 0 if successful

Description

This virtual method deletes the actual file referenced by this File object. If successful, the method returns a value of zero.

 

File Class


Size()

public method<int> Size()

Parameters

None

Return Value

Returns size of file

Description

This method returns the size of the actual file in bytes. If the file doesn't actually exist, this method will return false.

 

File Class


Copy()

public method<int> Copy(string NewFile)

Parameters

NewFile

File name the contents will be copied to

Return Value

Returns 0 if successful

Description

This method copies the entire contents of the file referenced by this File object to the new file location specified by NewFile. If the name is a local name (no directory back slashes), the file is copied within the same directory. If the name is a full name, it is copied to that location. The method returns zero if successful, and a non-zero error indicator if not.

 

File Class

 

Copyright © 2010-2013

Cold Spring Development Group

All Rights Reserved

Download Aztec