Eyeon:Script/Reference/Applications/Fusion/Classes/Fusion/OpenFile

From VFXPedia

Jump to: navigation, search

Contents

Fusion : OpenFile

Usage

file = OpenFile(string filename, integer mode)


Arguments

  • filename (required, string)

Specifies the full path and name of the file to open

  • mode (required, constant)

Specifies the mode(s) of file access required, from a combination of the following constants:

   FILE_MODE_READ        - Read access
   FILE_MODE_WRITE       - Write access
   FILE_MODE_UNBUFFERED  - Unbuffered access
   FILE_MODE_SHARED      - Shared access


Returns

An eyeonScript File object (see the IOClass documentation), or nil if the open fails.


Example

f = fusion:OpenFile([[c:\\eyeon.log]], FILE_MODE_READ)
 
line = f:ReadLine()
while line do
	print(line)
	line = f:ReadLine()
end


Tips for OpenFile (edit)

This function doesn't open compositions! Use LoadComp() instead!