{"id":1421,"date":"2024-01-30T12:27:11","date_gmt":"2024-01-30T17:27:11","guid":{"rendered":"https:\/\/chronocrash.com\/obor\/wiki\/?p=1421"},"modified":"2025-05-13T16:41:24","modified_gmt":"2025-05-13T21:41:24","slug":"filestream","status":"publish","type":"post","link":"https:\/\/chronocrash.com\/obor\/wiki\/filestream\/","title":{"rendered":"Filestream"},"content":{"rendered":"\n<p class=\"has-vivid-red-color has-text-color has-link-color wp-elements-f21ba5093e08b39452f25a899c586359\"><strong>Under Construction<\/strong><\/p>\n\n\n\n<p>Filestreams allow CRUD (Create, Read, Update, Delete) operations on user defined files during gameplay. You can sue these to build databases and add persistence features to games.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">openfilestream<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>int openfilestream(char filename, int (optional) save);<\/code><\/pre>\n\n\n\n<p>Opens a file and loads its content into memory for reading. Returns index of opened filestream or -1 on failure.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>char filename<\/code> &#8211; Path and filename to open as a filestream.<\/li>\n\n\n\n<li><code>int save<\/code> &#8211; Optional\n<ul class=\"wp-block-list\">\n<li>0 (default) &#8211; Path is relevant to pack location.<\/li>\n\n\n\n<li>1 &#8211; Path is relevant to Saves folder.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>char file_name = \"data\/config.txt\";\nint save_dir = 0;\n\nint index = openfilestream(\"data\/config.txt\", save_dir (optional));<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Under Construction Filestreams allow CRUD (Create, Read, Update, Delete) operations on user defined files during gameplay. You can sue these to build databases and add persistence features to games. openfilestream Opens a file and loads its content into memory for reading. Returns index of opened filestream or -1 on failure.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[328,2],"tags":[562,559,563,560,555,556,554,557,564,553,561,67,558],"class_list":["post-1421","post","type-post","status-publish","format-standard","hentry","category-openbor","category-script","tag-closefilestream","tag-createfilestream","tag-filestream","tag-filestreamappend","tag-filestreamnextline","tag-getfilestreamargument","tag-getfilestreamline","tag-getfilestreamposition","tag-openborscript","tag-openfilestream","tag-savefilestream","tag-script","tag-setfilestreamposition"],"revision_note":"","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts\/1421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/comments?post=1421"}],"version-history":[{"count":4,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts\/1421\/revisions"}],"predecessor-version":[{"id":1436,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts\/1421\/revisions\/1436"}],"wp:attachment":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/media?parent=1421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/categories?post=1421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/tags?post=1421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}