Difference between revisions of "API:IOUtils"

From Kerbal Space Program Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!-- Autogenerated by WRAPTOOL.  Yell at N3X15 if it breaks. -->
+
<!-- Autogenerated by DOCTOOL.  Yell at N3X15 if it breaks. -->
 
{{Namespace:KSP.IO}}
 
{{Namespace:KSP.IO}}
 
{{Class
 
{{Class
Line 10: Line 10:
 
|returndesc=
 
|returndesc=
 
|name=DeserializeFromBinary
 
|name=DeserializeFromBinary
|args=byte[] input
+
|args={{arg|byte|input|array=[]}}
 
|desc=Deserialize a binary serialized object
 
|desc=Deserialize a binary serialized object
 
}}
 
}}
 
{{StaticMethod
 
{{StaticMethod
|returntype=byte[]
+
|returntype=byte
 +
|array=[]
 
|returndesc=
 
|returndesc=
 
|name=SerializeToBinary
 
|name=SerializeToBinary
|args=object something
+
|args={{arg|object|something}}
 
|desc=Serialize an object (same as using a BinaryFormatter).
 
|desc=Serialize an object (same as using a BinaryFormatter).
 
}}
 
}}
Line 24: Line 25:
 
|returndesc=
 
|returndesc=
 
|name=GetFilePathFor
 
|name=GetFilePathFor
|args=Type T, string file, Vessel flight = null
+
|args={{arg|Type|T}}, {{arg|string|file}}, {{arg|Vessel|flight|default=null}}
 
|desc=Return the full path for a given filename, provided a class from the plugin. PluginData/[.flights/FLIGHT_UUID/]assemblyname/file
 
|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