varaq-wasm-c/docs/var'aq Filesystem Supplemen...

273 lines
16 KiB
HTML

<script src="//archive.org/includes/analytics.js?v=cf34f82" type="text/javascript"></script>
<script type="text/javascript">window.addEventListener('DOMContentLoaded',function(){var v=archive_analytics.values;v.service='wb';v.server_name='wwwb-app226.us.archive.org';v.server_ms=201;archive_analytics.send_pageview({});});</script>
<script type="text/javascript" src="/_static/js/bundle-playback.js?v=UfTkgsKx" charset="utf-8"></script>
<script type="text/javascript" src="/_static/js/wombat.js?v=UHAOicsW" charset="utf-8"></script>
<script type="text/javascript">
__wm.init("https://web.archive.org/web");
__wm.wombat("http://geocities.com/connorbd/varaq/proposals/vqfs.html","20091026220614","https://web.archive.org/","web","/_static/",
"1256594774");
</script>
<link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=omkqRugM" />
<link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=qtvMKcIJ" />
<!-- End Wayback Rewrite JS Include -->
<title>var'aq Filesystem Supplement</title>
<!-- BEGIN WAYBACK TOOLBAR INSERT -->
<style type="text/css">
body {
margin-top:0 !important;
padding-top:0 !important;
/*min-width:800px !important;*/
}
</style>
<script>__wm.rw(0);</script>
<div id="wm-ipp-base" lang="en" style="display:none;direction:ltr;">
<div id="wm-ipp" style="position:fixed;left:0;top:0;right:0;">
<div id="wm-ipp-inside">
<div style="position:relative;">
<div id="wm-logo" style="float:left;width:110px;padding-top:12px;">
<a href="/web/" title="Wayback Machine home page"><img src="/_static/images/toolbar/wayback-toolbar-logo-200.png" srcset="/_static/images/toolbar/wayback-toolbar-logo-100.png, /_static/images/toolbar/wayback-toolbar-logo-150.png 1.5x, /_static/images/toolbar/wayback-toolbar-logo-200.png 2x" alt="Wayback Machine" style="width:100px" border="0" /></a>
</div>
<div class="r" style="float:right;">
<div id="wm-btns" style="text-align:right;height:25px;">
<div id="wm-save-snapshot-success">success</div>
<div id="wm-save-snapshot-fail">fail</div>
<a id="wm-save-snapshot-open" href="#"
title="Share via My Web Archive" >
<span class="iconochive-web"></span>
</a>
<a href="https://archive.org/account/login.php"
title="Sign In"
id="wm-sign-in"
>
<span class="iconochive-person"></span>
</a>
<span id="wm-save-snapshot-in-progress" class="iconochive-web"></span>
<a href="http://faq.web.archive.org/" title="Get some help using the Wayback Machine" style="top:-6px;"><span class="iconochive-question" style="color:rgb(87,186,244);font-size:160%;"></span></a>
<a id="wm-tb-close" href="#close" onclick="__wm.h(event);return false;" style="top:-2px;" title="Close the toolbar"><span class="iconochive-remove-circle" style="color:#888888;font-size:240%;"></span></a>
</div>
<div id="wm-share">
<a href="/web/20091026220614/http://web.archive.org/screenshot/http://geocities.com/connorbd/varaq/proposals/vqfs.html"
id="wm-screenshot"
title="screenshot">
<span class="wm-icon-screen-shot"></span>
</a>
<a href="#"
id="wm-video"
title="video">
<span class="iconochive-movies"></span>
</a>
<a id="wm-share-facebook" href="#" data-url="https://web.archive.org/web/20091026220614/http://geocities.com/connorbd/varaq/proposals/vqfs.html" title="Share on Facebook" style="margin-right:5px;" target="_blank"><span class="iconochive-facebook" style="color:#3b5998;font-size:160%;"></span></a>
<a id="wm-share-twitter" href="#" data-url="https://web.archive.org/web/20091026220614/http://geocities.com/connorbd/varaq/proposals/vqfs.html" title="Share on Twitter" style="margin-right:5px;" target="_blank"><span class="iconochive-twitter" style="color:#1dcaff;font-size:160%;"></span></a>
</div>
</div>
<table class="c" style="">
<tbody>
<tr>
<td class="u" colspan="2">
<form target="_top" method="get" action="/web/submit" name="wmtb" id="wmtb"><input type="text" name="url" id="wmtbURL" value="http://geocities.com/connorbd/varaq/proposals/vqfs.html" onfocus="this.focus();this.select();" /><input type="hidden" name="type" value="replay" /><input type="hidden" name="date" value="20091026220614" /><input type="submit" value="Go" /></form>
</td>
<td class="n" rowspan="2" style="width:110px;">
<table>
<tbody>
<!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
<tr class="m">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20090830125352/http://geocities.com/connorbd/varaq/proposals/vqfs.html" title="30 Aug 2009"><strong>Aug</strong></a></td>
<td class="c" id="displayMonthEl" title="You are here: 22:06:14 Oct 26, 2009">OCT</td>
<td class="f" nowrap="nowrap">Nov</td>
</tr>
<!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
<tr class="d">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20091024132344/http://geocities.com/connorbd/varaq/proposals/vqfs.html" title="13:23:44 Oct 24, 2009"><img src="/_static/images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a></td>
<td class="c" id="displayDayEl" style="width:34px;font-size:24px;white-space:nowrap;" title="You are here: 22:06:14 Oct 26, 2009">26</td>
<td class="f" nowrap="nowrap"><img src="/_static/images/toolbar/wm_tb_nxt_off.png" alt="Next capture" width="14" height="16" border="0" /></td>
</tr>
<!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
<tr class="y">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20030415033054/http://www.geocities.com:80/connorbd/varaq/proposals/vqfs.html" title="15 Apr 2003"><strong>2003</strong></a></td>
<td class="c" id="displayYearEl" title="You are here: 22:06:14 Oct 26, 2009">2009</td>
<td class="f" nowrap="nowrap">2010</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="s">
<div id="wm-nav-captures">
<a class="t" href="/web/20091026220614*/http://geocities.com/connorbd/varaq/proposals/vqfs.html" title="See a list of every capture for this URL">5 captures</a>
<div class="r" title="Timespan for captures of this URL">24 Feb 2003 - 26 Oct 2009</div>
</div>
</td>
<td class="k">
<a href="" id="wm-graph-anchor">
<div id="wm-ipp-sparkline" title="Explore captures for this URL" style="position: relative">
<canvas id="wm-sparkline-canvas" width="650" height="27" border="0"></canvas>
</div>
</a>
</td>
</tr>
</tbody>
</table>
<div style="position:absolute;bottom:0;right:2px;text-align:right;">
<a id="wm-expand" class="wm-btn wm-closed" href="#expand" onclick="__wm.ex(event);return false;"><span id="wm-expand-icon" class="iconochive-down-solid"></span> <span style="font-size:80%">About this capture</span></a>
</div>
</div>
<div id="wm-capinfo" style="border-top:1px solid #777;display:none; overflow: hidden">
<div id="wm-capinfo-collected-by">
<div style="background-color:#666;color:#fff;font-weight:bold;text-align:center">COLLECTED BY</div>
<div style="padding:3px;position:relative" id="wm-collected-by-content">
<div style="display:inline-block;vertical-align:top;width:50%;">
<span class="c-logo" style="background-image:url(https://archive.org/services/img/webwidecrawl);"></span>
Organization: <a style="color:#33f;" href="https://archive.org/details/webwidecrawl" target="_new"><span class="wm-title">Internet Archive</span></a>
<div style="max-height:75px;overflow:hidden;position:relative;">
<div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div>
The Internet Archive discovers and captures web pages through many different web crawls.
At any given time several distinct crawls are running, some for months, and some every day or longer.
View the web archive through the <a href="http://archive.org/web/web.php">Wayback Machine</a>.
</div>
</div>
<div style="display:inline-block;vertical-align:top;width:49%;">
<span class="c-logo" style="background-image:url(https://archive.org/services/img/geocities)"></span>
<div>Collection: <a style="color:#33f;" href="https://archive.org/details/geocities" target="_new"><span class="wm-title">Geocities Closing Crawl</span></a></div>
<div style="max-height:75px;overflow:hidden;position:relative;">
<div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div>
Geocities crawl performed by Internet Archive. This data is currently not publicly accessible.
<br /><br />
from <a href="https://en.wikipedia.org/wiki/Geocities">Wikipedia</a>:
<br />
Yahoo! GeoCities is a Web hosting service. GeoCities was originally founded by David Bohnett and John Rezner in late 1994 as Beverly Hills Internet (BHI), and by 1999 GeoCities was the third-most visited Web site on the World Wide Web. In its original form, site users selected a "city" in which to place their Web pages. The "cities" were metonymously named after real cities or regions according to their content—for example, computer-related sites were placed in "SiliconValley" and those dealing with entertainment were assigned to "Hollywood"—hence the name of the site. Shortly after its acquisition by Yahoo!, this practice was abandoned in favor of using the Yahoo! member names in the URLs.
<br /><br />
In April 2009, approximately ten years after Yahoo! bought GeoCities, the company announced that it would shut down the United States GeoCities service on October 26, 2009. There were at least 38 million user-built pages on GeoCities before it was shut down.
<br /><br />
</div>
</div>
</div>
</div>
<div id="wm-capinfo-timestamps">
<div style="background-color:#666;color:#fff;font-weight:bold;text-align:center" title="Timestamps for the elements of this page">TIMESTAMPS</div>
<div>
<div id="wm-capresources" style="margin:0 5px 5px 5px;max-height:250px;overflow-y:scroll !important"></div>
<div id="wm-capresources-loading" style="text-align:left;margin:0 20px 5px 5px;display:none"><img src="/_static/images/loading.gif" alt="loading" /></div>
</div>
</div>
</div></div></div></div><div id="wm-ipp-print">The Wayback Machine - https://web.archive.org/web/20091026220614/http://geocities.com/connorbd/varaq/proposals/vqfs.html</div>
<div id="donato" style="position:relative;width:100%;">
<div id="donato-base">
<iframe id="donato-if" src="https://archive.org/includes/donate.php?as_page=1&amp;platform=wb&amp;referer=https%3A//web.archive.org/web/20091026220614/http%3A//geocities.com/connorbd/varaq/proposals/vqfs.html"
scrolling="no" frameborder="0" style="width:100%; height:100%">
</iframe>
</div>
</div><script type="text/javascript">
__wm.bt(650,27,25,2,"web","http://geocities.com/connorbd/varaq/proposals/vqfs.html","20091026220614",1996,"/_static/",["/_static/css/banner-styles.css?v=omkqRugM","/_static/css/iconochive.css?v=qtvMKcIJ"], false);
__wm.rw(1);
</script>
<!-- END WAYBACK TOOLBAR INSERT --><h1>Filesystem Functions in <i>var'aq</i></h1><br>
<h3>De'ghomjangwI'mey</h3><p>
<h3>F.1 Introduction</h3><p>
<h4>F.1.1 vfs Described</h4><p>
This page describes a simple filesystem extension to the <i>var'aq</i>
programming language. It is a fairly simple scheme that gives little or no
thought to the intricacies of security on a <i>var'aq</i>-based system;
its primary functions are limited to creating, reading, writing, and
appending files and it makes no pretensions of being a production-quality
filesystem. <p>
Certain non-Earthly features do exist, however; there is no concept of a
file descriptor inherent in the design. File reads and writes are done by
copying text data (no binary data at this stage) into and out of strings.
(A close equivalent to a file descriptor in vfs would be a variable with
an attached pathname; this is a fairly common idiom in systems that must
keep constant access to specific files, but is not explicitly a part of
the filesystem.) <p>
<h4>F.1.2 Pathnames/<i>SammoHpongmey</i></h4><p>
This document makes frequent reference to pathnames (<i>SammoHpongmey</i>
or beacon-names). The precise meaning of this term approximates the Earth
understanding of the term, though it may also include out-of-band
information such as authentication tickets and content filters.
<h4>F.1.3 vfs Error Codes</h4><p>
All vfs functions have basically similar error semantics. Since the system
is stateless, any function that cannot find the file it's looking for will
return a null pathname (SammoH Hegh, dead beacon).
<h3>F.2 Creating and Deleting Files</h3><p>
<h4>F.2.1 fcreate/cher_De'ghom</h4><p>
<i>pathname <b>cher_De'ghom</b> -</i><p>
Creates a file with the specified <i>pathname</i>.
<h4>F.2.2 flock/Doq_De'ghom</h4><p>
<i>pathname <b>Doq_De'ghom</b> -</i><p>
Restricts write access to the file at <i>pathname</i> to the current
process. Generally used in roughly the same place as an <i>fopen()</i> in
C, though the semantics are drastically different.<p>
<h4>F.2.3 funlock/DoqHa'_De'ghom</h4><p>
<i>pathname <b>DoqHa'_De'ghom</b> -</i><p>
Unlocks the file at <i>pathname</i>. This is generally handled by the
filesystem garbage collector at process termination time, but it is
considered good practice to take care of it yourself, especially in an
embedded environment.<p>
<h4>F.2.4 fdelete/HoH_De'ghom</h4><p>
<i>pathname <b>HoH_De'ghom</b> -</i><p>
Removes the file at <i>pathname</i>. <p>
<h3>F.3 Reading and Writing Files</h3><p>
<h4>F.3.1 fread/jotlh_De'ghom</h4><p>
<i>pathname <b>jotlh_De'ghom</b> str </i><p>
Copies the contents of the file at <i>pathname</i> into <i>str</i>;
returns null pathname on failure.<p>
<h4>F.3.2 fwrite/tatlh_De'ghom</h4><p>
<i>str pathname <b>tatlh_De'ghom</b> -</i><p>
Replaces the contents of the file at <i>pathname</i> with <i>str</i>.<p>
<!-- following code added by server. PLEASE REMOVE -->
<!-- preceding code added by server. PLEASE REMOVE --><!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet><script language="JavaScript" src="https://web.archive.org/web/20091026220614js_/http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script language="JavaScript" src="https://web.archive.org/web/20091026220614js_/http://us.js2.yimg.com/us.js.yimg.com/lib/smb/js/hosting/cp/js_source/geov2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="https://web.archive.org/web/20091026220614im_/http://visit.geocities.yahoo.com/visit.gif?us1256594774" alt="setstats" border="0" width="1" height="1"></noscript>
<img src="https://web.archive.org/web/20091026220614im_/http://geo.yahoo.com/serv?s=76001067&amp;t=1256594774&amp;f=us-w1" alt="1" width="1" height="1">
<!--
FILE ARCHIVED ON 22:06:14 Oct 26, 2009 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 02:33:02 Nov 21, 2021.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
-->
<!--
playback timings (ms):
captures_list: 105.736
exclusion.robots: 0.187
exclusion.robots.policy: 0.18
RedisCDXSource: 0.786
esindex: 0.008
LoadShardBlock: 84.563 (3)
PetaboxLoader3.datanode: 85.62 (4)
CDXLines.iter: 14.949 (3)
load_resource: 91.048
PetaboxLoader3.resolve: 43.77
-->