WMS:WMLibFileIo: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
(Created page with " == Description == The '''public class FileIo''' class is used to handle file I/O operations in the WMLib. == Functions == *'''public static bool FileCompare(string file1, str...")
 
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Description ==
== Description ==


The '''public class FileIo''' class is used to handle file I/O operations in the WMLib.
The '''public class FileIo''' class is used to handle file I/O operations in the WMLib.  The functions in this class are static, meaning you don't have to create a new instance of the class to access the functions-you can access them directly.


== Functions ==
== Functions ==
Line 12: Line 11:
*'''public static bool ReadTreeFile(string a_fileName, WMLib.HydroTree a_hydroTree)'''
*'''public static bool ReadTreeFile(string a_fileName, WMLib.HydroTree a_hydroTree)'''


This function reads a WMS Tree (.tre) file with the name '''a_filename''' and stores the tree information in the hydrologic tree '''a_hydrotree'''.
This function reads a WMS Tree (.tre) file with the name '''a_filename''' and stores the tree information and the hydrologic data in the hydrologic tree '''a_hydrotree'''. The function returns '''true''' if successful and '''false''' otherwise.  See the example in the [[WMS:WMLib|introduction]] to see how this function is used.
 
{{WMLibMain}}
 
[[Category:WMLib|File]]

Latest revision as of 19:08, 11 January 2017

Description

The public class FileIo class is used to handle file I/O operations in the WMLib. The functions in this class are static, meaning you don't have to create a new instance of the class to access the functions-you can access them directly.

Functions

  • public static bool FileCompare(string file1, string file2)

This function compares two files, file1 and file2. The return value is true if the contents of the files are exactly the same and false otherwise.

  • public static bool ReadTreeFile(string a_fileName, WMLib.HydroTree a_hydroTree)

This function reads a WMS Tree (.tre) file with the name a_filename and stores the tree information and the hydrologic data in the hydrologic tree a_hydrotree. The function returns true if successful and false otherwise. See the example in the introduction to see how this function is used.