Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
KSP.IO.File Class Reference

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 KSP.IO.TextWriter AppendText< T > (string filename, Vessel flight=null)
 Open a stream that appends to a file. More...
 
static KSP.IO.FileStream Create< T > (string filename, Vessel flight=null)
 Open a stream that creates a file. More...
 
static KSP.IO.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 KSP.IO.FileStream Open< T > (string filename, KSP.IO.FileMode mode, Vessel flight=null)
 Open a stream that operates on a file. More...
 
static KSP.IO.TextReader OpenText< T > (string filename, Vessel flight=null)
 Open a stream that operates on a file. More...
 
static KSP.IO.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...
 

Member Function Documentation

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

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

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
dataThe string to store as a text file.
static KSP.IO.TextWriter KSP.IO.File.AppendText< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Open a stream that appends to a file.

Template Parameters
TCalling class
Parameters
filenameThe file to append to.
flightA vessel that relates to the data about to be written.
static KSP.IO.FileStream KSP.IO.File.Create< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Open a stream that creates a file.

Template Parameters
TCalling class
Parameters
filenameThe file to write to.
flightA vessel that relates to the data about to be written.
static KSP.IO.TextWriter KSP.IO.File.CreateText< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Open a stream that creates a file.

Template Parameters
TCalling class
Parameters
filenameThe file to write to.
flightA vessel that relates to the data about to be written.
static void KSP.IO.File.Delete< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Delete a file in your IO sandbox.

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
static bool KSP.IO.File.Exists< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Find out if a file in your IO sandbox exists.

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
Returns
True if file exists.
static KSP.IO.FileStream KSP.IO.File.Open< T > ( string  filename,
KSP.IO.FileMode  mode,
Vessel  flight = null 
)
inlinestatic

Open a stream that operates on a file.

Template Parameters
TCalling class
Parameters
filenameThe file to write to.
flightA vessel that relates to the data about to be written.
static KSP.IO.TextReader KSP.IO.File.OpenText< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Open a stream that operates on a file.

Template Parameters
TCalling class
Parameters
filenameThe file to write to.
flightA vessel that relates to the data about to be written.
static KSP.IO.FileStream KSP.IO.File.OpenWrite< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Open a stream that writes to a file.

Template Parameters
TCalling class
Parameters
filenameThe file to write to.
flightA vessel that relates to the data about to be written.
static byte [] KSP.IO.File.ReadAllBytes< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

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

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
Returns
Content of the file requested
static string [] KSP.IO.File.ReadAllLines< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

Read all lines from a file in your IO sandbox.

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
Returns
array of lines in the file
static string KSP.IO.File.ReadAllText< T > ( string  filename,
Vessel  flight = null 
)
inlinestatic

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

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
Returns
All the text in that file
static void KSP.IO.File.WriteAllBytes< T > ( byte[]  data,
string  filename,
Vessel  flight = null 
)
inlinestatic

Write a bunch of bytes to a file on disk

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
dataThe bytes to store as a binary file
static void KSP.IO.File.WriteAllLines< T > ( string[]  data,
string  filename,
Vessel  flight = null 
)
inlinestatic

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

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
datastrings to write as lines
static void KSP.IO.File.WriteAllText< T > ( string  data,
string  filename,
Vessel  flight = null 
)
inlinestatic

Write a string to a file.

Template Parameters
TClass that is calling
Parameters
filenameFilename to look for
flightThe flight to track
dataThe string to store as a text file.

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