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 |
| CodePage | Numeric | The codepage for this file. |
| Description | Character | The description saved for this file. The description appears in the bottom panel of the Project Manager when the file has focus. |
| Exclude | 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. |
| FileClass, FileClassLibrary | 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. |
| LastModified | DateTime | The date and time at which the file was last changed. |
| Name | Character | The filename, including the path. |
| ReadOnly | 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. |
| SCCStatus | Numeric | Indicates the file's status with the project's source control provider. If there is no source control provider, contains 0. |
| Type | Single character | Indicates what kind of file this is. |
| Method | Purpose |
| AddToSCC | Adds the file to the project's source control provider. |
| CheckIn | Checks the file into the source control provider. |
| CheckOut | Checks the file out of the source control provider. |
| GetLatestVersion | Brings a read-only copy of the file in its current state to the local drive. |
| Modify | Opens the file in its native editing tool. |
| Remove | Removes the file from the project, optionally deleting it from the disk as well. |
| RemoveFromSCC | Removes the file from source control. |
| Run | Runs the file. For reports, previews the file. |
| UndoCheckOut | 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 |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.