Skip to content

Commit c0a27d5

Browse files
committed
io.sys is now fully documented
1 parent caf0256 commit c0a27d5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • 7Sharp/Intrerpreter/SysLibraries

7Sharp/Intrerpreter/SysLibraries/LibIO.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ private static Stream ReadFile(string path)
160160
}
161161
}
162162

163+
[ManualDocs("writeFile", "{\"title\":\"writeFile(path)\",\"sections\":[{\"header\":\"Syntax\",\"text\":[{\"text\":\"writeFile(<path>);\"}]},{\"header\":\"Behavior\",\"text\":[{\"text\":\"Get a write stream to file at \"},{\"text\":\"path\",\"color\":\"Green\"},{\"text\":\". See the following for more info: \"},{\"text\":\"writeText writeLine writeByte\",\"color\":\"Yellow\"}]}]}")]
163164
private static Stream WriteFile(string path)
164165
{
165166
try
@@ -172,6 +173,7 @@ private static Stream WriteFile(string path)
172173
}
173174
}
174175

176+
[ManualDocs("readByte", "{\"title\":\"readByte(s)\",\"sections\":[{\"header\":\"Syntax\",\"text\":[{\"text\":\"readByte(<stream>);\"}]},{\"header\":\"Behavior\",\"text\":[{\"text\":\"Read a byte from stream \"},{\"text\":\"s\",\"color\":\"Green\"}]}]}")]
175177
private static byte ReadByte(Stream stream)
176178
{
177179
if (stream.CanRead)
@@ -200,6 +202,7 @@ private static byte ReadByte(Stream stream)
200202
}
201203
}
202204

205+
[ManualDocs("writeByte", "{\"title\":\"writeByte(s, v)\",\"sections\":[{\"header\":\"Syntax\",\"text\":[{\"text\":\"writeByte(<stream>, <value>);\"}]},{\"header\":\"Behavior\",\"text\":[{\"text\":\"Write byte \"},{\"text\":\"v\",\"color\":\"Green\"},{\"text\":\" to stream \"},{\"text\":\"s\",\"color\":\"Green\"}]}]}")]
203206
private static void WriteByte(Stream stream, int v)
204207
{
205208
if (stream.CanWrite)

0 commit comments

Comments
 (0)