Interface IStdFileSystemModule
MS-VBAL 6.1.2.5 FileSystem Module
[StdLibModule(null)]
public interface IStdFileSystemModule
Remarks
Formalizes the public interface of the standard library VBA.FileSystem module.
ℹ️ This interface is currently incomplete.
Methods
FreeFile(VBVariantValue?)
MS-VBAL 6.1.2.5.1.7 FreeFile Gets the next file number available for an Open
statement to use (§5.4.5).
RuntimeSemanticsEvaluationResult<VBIntegerValue> FreeFile(VBVariantValue? rangeNumber = null)
Parameters
rangeNumberVBVariantValueWhich range to take the number from:
0— the default — for1-255, and1for256-511. The two halves exist so that a caller can keep its own channels away from another's.
Returns
- RuntimeSemanticsEvaluationResult<VBIntegerValue>
A RuntimeSemanticsEvaluationResult object encapsulating the result of the successful operation, or the error metadata otherwise.
Remarks
👉 The reason a program should not simply write #1: a file number is only free if nothing else
has it open, and nothing about the language stops two parts of one program each opening files. Asking
for a free one is how they avoid colliding.