Difference between revisions of "API:IOUtils"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "{{Namespace:KSP.IO}} {{Class |name=IOUtils |summary=Various internal tools. }} {{MethodsStart}} {{StaticMethod |returntype=string |returndesc= |name=GetFilePathFor |args=Type ...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<!-- Autogenerated by DOCTOOL.  Yell at N3X15 if it breaks. -->
 
{{Namespace:KSP.IO}}
 
{{Namespace:KSP.IO}}
 
{{Class
 
{{Class
 
|name=IOUtils
 
|name=IOUtils
|summary=Various internal tools.
+
|summary=Has some useful little tools and utilities.
 
}}
 
}}
 
{{MethodsStart}}
 
{{MethodsStart}}
 +
{{StaticMethod
 +
|returntype=object
 +
|returndesc=
 +
|name=DeserializeFromBinary
 +
|args={{arg|byte|input|array=[]}}
 +
|desc=Deserialize a binary serialized object
 +
}}
 +
{{StaticMethod
 +
|returntype=byte
 +
|array=[]
 +
|returndesc=
 +
|name=SerializeToBinary
 +
|args={{arg|object|something}}
 +
|desc=Serialize an object (same as using a BinaryFormatter).
 +
}}
 
{{StaticMethod
 
{{StaticMethod
 
|returntype=string
 
|returntype=string
 
|returndesc=
 
|returndesc=
 
|name=GetFilePathFor
 
|name=GetFilePathFor
|args=Type T, string filename, [Vessel flight=null]
+
|args={{arg|Type|T}}, {{arg|string|file}}, {{arg|Vessel|flight|default=null}}
|desc=Outputs the full path to the desired filename.
+
|desc=Return the full path for a given filename, provided a class from the plugin. PluginData/[.flights/FLIGHT_UUID/]assemblyname/file
 
}}
 
}}
 
{{MethodsEnd}}
 
{{MethodsEnd}}

Latest revision as of 21:39, 12 October 2012

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

IOUtils Class

Has some useful little tools and utilities.

Methods

The following are methods included in IOUtils.

Signature Description
static object DeserializeFromBinary(byte[] input) Deserialize a binary serialized object
static byte[] SerializeToBinary(object something) Serialize an object (same as using a BinaryFormatter).
static string GetFilePathFor(Type T, string file, Vessel flight = null) Return the full path for a given filename, provided a class from the plugin. PluginData/[.flights/FLIGHT_UUID/]assemblyname/file