File
This object is the building block for projects. Every project contains a Files collection composed of File objects. Each File object represents one file (or group of files, like a form) in the project.
Property |
Value |
Purpose |
Numeric |
The codepage for this file. |
|
Character |
The description saved for this file. The description appears in the bottom panel of the Project Manager when the file has focus. |
|
Logical |
Indicates whether the file is to be included in an APP or EXE built from the project. Actually, indicates whether it should be excluded. |
|
Character |
If the file is a form, these two indicate the name and library of the class it's based on. If the file is not a form, each contains an empty string. |
|
DateTime |
The date and time at which the file was last changed. |
|
Character |
The filename, including the path. |
|
Logical |
This property tells you if the file can be edited. ReadOnly is .T. if the file is checked in under source code control or if it is flagged Read-Only. ReadOnly cannot be directly changed—you need to either check out the file or clear the Read-Only attribute to toggle this property. |
|
Numeric |
Indicates the file's status with the project's source control provider. If there is no source control provider, contains 0. |
|
Single character |
Indicates what kind of file this is. |
Method |
Purpose |
Adds the file to the project's source control provider. |
|
Checks the file into the source control provider. |
|
Checks the file out of the source control provider. |
|
Brings a read-only copy of the file in its current state to the local drive. |
|
Opens the file in its native editing tool. |
|
Removes the file from the project, optionally deleting it from the disk as well. |
|
Removes the file from source control. |
|
Runs the file. For reports, previews the file. |
|
Changes the file's source control status to checked in, discarding any changes since checkout. |
Example |
* See what's in a project FOR EACH oFile IN _VFP.ActiveProject.Files ? oFile.Name, oFile.Type ENDFOR |
See Also |
AddToSCC, CheckIn, CheckOut, CodePage, Description, Exclude, FileClass, FileClassLibrary, Files, GetLatestVersion, LastModified, Modify, Name, Project, ReadOnly, Remove, RemoveFromSCC, Run Method, SCCStatus, Type Property, UndoCheckOut |