SplitScript reference / FileVersion
FileVersion
record
record FileVersion
A four-part numeric Windows executable version.
The components correspond to major.minor.build.private in a PE VS_FIXEDFILEINFO resource. Keeping the parts typed avoids depending on the inconsistent punctuation of legacy FileVersionInfo strings.
Examples
Compare a discovered version to a literal
let supported = v"1.2.3.4" == v"1.2.3.4"
Capabilities
| Member | Description | Available through |
|---|---|---|
| Debug | Produces an unambiguous structural representation of a value. | |
| Display | Supports conversion to a user-facing textual representation. | |
| Equatable | Supports equality comparison. |
Fields
| Member | Description | Available through |
|---|---|---|
| build | Build version component. | |
| major | Major version component. | |
| minor | Minor version component. | |
| privatePart | Private version component. |
Operators
| Member | Description | Available through |
|---|---|---|
| == | Reports whether this value and another value are equal. | Available through Equatable |
| != | Reports whether this value and another value differ. | Available through Equatable |
Methods
| Member | Description | Available through |
|---|---|---|
| debugString | Converts the receiver to its unambiguous structural representation. | Available through Debug |
| toString | Converts the receiver to its user-facing string representation. | Available through Display |
| fromParts | Constructs a numeric Windows file version from its four components. | |
| toString | Formats the version as major.minor.build.private. |