KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions | List of all members
KSP.IO.File Class Reference

Public Member Functions

 File ()
 

Static Public Member Functions

static void AppendAllText< T > (string data, string filename, Vessel flight=null)
 Append a string to a file, or creates it if it doesn't exist. More...
 
static TextWriter AppendText< T > (string filename, Vessel flight=null)
 Open a stream that appends to a file. More...
 
static FileStream Create< T > (string filename, Vessel flight=null)
 Open a stream that creates a file. More...
 
static TextWriter CreateText< T > (string filename, Vessel flight=null)
 Open a stream that creates a file. More...
 
static void Delete< T > (string filename, Vessel flight=null)
 Delete a file in your IO sandbox. More...
 
static bool Exists< T > (string filename, Vessel flight=null)
 Find out if a file in your IO sandbox exists. More...
 
static FileStream Open< T > (string filename, FileMode mode, Vessel flight=null)
 Open a stream that operates on a file. More...
 
static TextReader OpenText< T > (string filename, Vessel flight=null)
 Open a stream that operates on a file. More...
 
static FileStream OpenWrite< T > (string filename, Vessel flight=null)
 Open a stream that writes to a file. More...
 
static byte[] ReadAllBytes< T > (string filename, Vessel flight=null)
 Read all the bytes from a file in your IO sandbox. More...
 
static string[] ReadAllLines< T > (string filename, Vessel flight=null)
 Read all lines from a file in your IO sandbox. More...
 
static string ReadAllText< T > (string filename, Vessel flight=null)
 Read all the text from a file in your IO sandbox. More...
 
static void WriteAllBytes< T > (byte[] data, string filename, Vessel flight=null)
 Write a bunch of bytes to a file on disk More...
 
static void WriteAllLines< T > (string[] data, string filename, Vessel flight=null)
 Write an array of strings to a file, with each string becoming a line. More...
 
static void WriteAllText< T > (string data, string filename, Vessel flight=null)
 Write a string to a file. More...
 

Constructor & Destructor Documentation

KSP.IO.File.File ( )

Member Function Documentation

static void KSP.IO.File.AppendAllText< T > ( string  data,
string  filename,
Vessel  flight = null 
)
static

Append a string to a file, or creates it if it doesn't exist.

Template Parameters
T
Parameters
data
filename
flight
static TextWriter KSP.IO.File.AppendText< T > ( string  filename,
Vessel  flight = null 
)
static

Open a stream that appends to a file.

Template Parameters
T
Parameters
filename
flight
Returns
static FileStream KSP.IO.File.Create< T > ( string  filename,
Vessel  flight = null 
)
static

Open a stream that creates a file.

Template Parameters
T
Parameters
filename
flight
Returns
static TextWriter KSP.IO.File.CreateText< T > ( string  filename,
Vessel  flight = null 
)
static

Open a stream that creates a file.

Template Parameters
T
Parameters
filename
flight
Returns
static void KSP.IO.File.Delete< T > ( string  filename,
Vessel  flight = null 
)
static

Delete a file in your IO sandbox.

Template Parameters
T
Parameters
filename
flight
static bool KSP.IO.File.Exists< T > ( string  filename,
Vessel  flight = null 
)
static

Find out if a file in your IO sandbox exists.

Template Parameters
T
Parameters
filename
flight
Returns
static FileStream KSP.IO.File.Open< T > ( string  filename,
FileMode  mode,
Vessel  flight = null 
)
static

Open a stream that operates on a file.

Template Parameters
T
Parameters
filename
mode
flight
Returns
static TextReader KSP.IO.File.OpenText< T > ( string  filename,
Vessel  flight = null 
)
static

Open a stream that operates on a file.

Template Parameters
T
Parameters
filename
flight
Returns
static FileStream KSP.IO.File.OpenWrite< T > ( string  filename,
Vessel  flight = null 
)
static

Open a stream that writes to a file.

Template Parameters
T
Parameters
filename
flight
Returns
static byte [] KSP.IO.File.ReadAllBytes< T > ( string  filename,
Vessel  flight = null 
)
static

Read all the bytes from a file in your IO sandbox.

Template Parameters
T
Parameters
filename
flight
static string [] KSP.IO.File.ReadAllLines< T > ( string  filename,
Vessel  flight = null 
)
static

Read all lines from a file in your IO sandbox.

Template Parameters
T
Parameters
filename
flight
Returns
static string KSP.IO.File.ReadAllText< T > ( string  filename,
Vessel  flight = null 
)
static

Read all the text from a file in your IO sandbox.

Template Parameters
T
Parameters
filename
flight
Returns
static void KSP.IO.File.WriteAllBytes< T > ( byte[]  data,
string  filename,
Vessel  flight = null 
)
static

Write a bunch of bytes to a file on disk

Template Parameters
T
Parameters
data
filename
flight
static void KSP.IO.File.WriteAllLines< T > ( string[]  data,
string  filename,
Vessel  flight = null 
)
static

Write an array of strings to a file, with each string becoming a line.

Template Parameters
T
Parameters
data
filename
flight
static void KSP.IO.File.WriteAllText< T > ( string  data,
string  filename,
Vessel  flight = null 
)
static

Write a string to a file.

Template Parameters
T
Parameters
data
filename
flight

The documentation for this class was generated from the following file: