Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:FileWriter (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> Info >> FileWriter
Package: 
Engine
Direct subclass:
FileLog
This class in other games:
UT3

This is a simple class that allows for secure writing of output files from within Script. The directory to which it writes files is determined by the file type member variable.

Properties[edit]

ArchivePtr[edit]

Type: pointer{FArchive}

Modifiers: const, native

Internal FArchive pointer

bFlushEachWrite[edit]

Type: bool

Whether we should flush to disk every time something is written. if false, only flush when the memory buffer is full or when the file is closed

Default value: True

bWantsAsyncWrites[edit]

Type: bool

Whether to use async writes (if available) or not. Overrides bFlushEachWrite

Filename[edit]

Type: string

Modifiers: const

File name, created via OpenFile()

FileType[edit]

Type: FWFileType

Modifiers: const

Holds the file type for this file.

Default values[edit]

Property Value
bTickIsDisabled True
CollisionType COLLIDE_CustomDefault

Subobjects[edit]

Sprite[edit]

Class: Engine.SpriteComponent

Inherits from: Info.Sprite

Property Value
ReplacementPrimitive None

Enums[edit]

FWFileType[edit]

Type of file

FWFT_Log 
Created in %GameDir%/Logs
FWFT_Stats 
Created in %GameDir%/Stats
FWFT_HTML 
Created in %GameDir%/Web/DynamicHTML
FWFT_User 
Created in %GameDir%/User
FWFT_Debug 
Created in %GameDir%/Debug

Functions[edit]

Native functions[edit]

CloseFile[edit]

native final function CloseFile ()

Closes the log file.

Logf[edit]

native final function Logf (coerce string logString)

Logs the given string to the log file.

Parameters:

  • logString - string to dump

OpenFile[edit]

native final function bool OpenFile (coerce string InFilename, optional FWFileType InFileType, optional string InExtension, optional bool bUnique, optional bool bIncludeTimeStamp)

Opens the actual file using the specified name.

Parameters:

  • InFilename - name of file to open
  • InFileType - the type of file being written
  • InExtension - optional file extension to use, defaults to .txt if none is specified
  • bUnique - whether to make unique or not
  • bIncludeTimeStamp - whether to include timestamps or not

Events[edit]

Destroyed[edit]

event Destroyed ()

Overrides: Actor.Destroyed

Overridden to automatically close the logfile on destruction.