Difference between revisions of "API:File"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Namespace:KSP.IO}} {{Class |name=File }} {{MethodsStart}} {{StaticMethod |returntype=void |returndesc= |name=Delete<T> |args=string filename, Vessel flight = null |desc=Dele...")
(No difference)

Revision as of 02:40, 18 May 2012

KSP.IO Namespace
BinaryReader · BinaryWriter · File · FileInfo · FileStream · IOException · IOTools · IOUtils · MemoryStream · PluginConfigNode · PluginConfiguration · TextReader · TextWriter

File Class

This article is a stub. You can help KSP Wiki by expanding it.

No summary has been written for this class.

Methods

The following are methods included in File.

Signature Description
static void Delete<T>(string filename, Vessel flight = null) Delete a file in your IO sandbox.
static bool Exists<T>(string filename, Vessel flight = null) Find out if a file in your IO sandbox exists.
static byte[] ReadAllBytes<T>(string filename, Vessel flight = null) Read all the bytes from a file in your IO sandbox.
static string[] ReadAllLines<T>(string filename, Vessel flight = null) Read all lines from a file in your IO sandbox.
static string ReadAllText<T>(string filename, Vessel flight = null) Read all the text from a file in your IO sandbox.
static void WriteAllBytes<T>(byte[] data, string filename, Vessel flight = null) Write a bunch of bytes to a file on disk
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.
static void WriteAllText<T>(string data, string filename, Vessel flight = null) Write a string to a file.