Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.FileWriter


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
/**
 * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
 *
 * 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.
*/

class FileWriter extends Info
	native;

/** Internal FArchive pointer */
var const native pointer ArchivePtr{FArchive};

/** File name, created via OpenFile() */
var const string Filename;

/** Type of file */

enum FWFileType
{
	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
};

var const FWFileType FileType;	// Holds the file type for this file.

/**
 * Opens the actual file using the specified name.
 *
 * @param	fileName - name of file to open
 *
 * @param	extension - optional file extension to use, defaults to
 * 			.txt if none is specified
 */

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

/**
 * Closes the log file.
 */
native final function CloseFile();

/**
 * Logs the given string to the log file.
 *
 * @param	logString - string to dump
 */
native final function Logf(coerce string logString);

/**
 * Overridden to automatically close the logfile on destruction.
 */
event Destroyed()
{
	CloseFile();
}

defaultproperties
{
   Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'Engine.Default__Info:Sprite'
      ObjectArchetype=SpriteComponent'Engine.Default__Info:Sprite'
   End Object
   Components(0)=Sprite
   CollisionType=COLLIDE_CustomDefault
   Name="Default__FileWriter"
   ObjectArchetype=Info'Engine.Default__Info'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: tr 31-1-2018 17:17:54.000 - Creation time: sk 18-3-2018 10:01:07.454 - Created with UnCodeX