<!doctype html> <html> <head> <meta charset='utf-8' /> <title>virtualfs 2.1.0 | Documentation</title> <meta name='viewport' content='width=device-width,initial-scale=1'> <link href='assets/bass.css' type='text/css' rel='stylesheet' /> <link href='assets/style.css' type='text/css' rel='stylesheet' /> <link href='assets/github.css' type='text/css' rel='stylesheet' /> <link href='assets/split.css' type='text/css' rel='stylesheet' /> </head> <body class='documentation m0'> <div class='flex'> <div id='split-left' class='overflow-auto fs0 height-viewport-100'> <div class='py1 px2'> <h3 class='mb0 no-anchor'>virtualfs</h3> <div class='mb1'><code>2.1.0</code></div> <input placeholder='Filter' id='filter-input' class='col12 block input' type='text' /> <div id='toc'> <ul class='list-reset h5 py1-ul'> <li><a href='#currentdirectory' class=""> CurrentDirectory </a> </li> <li><a href='#devices' class=""> Devices </a> </li> <li><a href='#full' class=""> Full </a> </li> <li><a href='#null' class=""> Null </a> </li> <li><a href='#random' class=""> Random </a> </li> <li><a href='#tty' class=""> Tty </a> </li> <li><a href='#zero' class=""> Zero </a> </li> <li><a href='#filedescriptors' class=""> FileDescriptors </a> </li> <li><a href='#filedescriptor' class=" toggle-sibling"> FileDescriptor <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#filedescriptorgetinode' class='regular pre-open'> #getINode </a></li> <li><a href='#filedescriptorgetflags' class='regular pre-open'> #getFlags </a></li> <li><a href='#filedescriptorsetflags' class='regular pre-open'> #setFlags </a></li> <li><a href='#filedescriptorgetpos' class='regular pre-open'> #getPos </a></li> <li><a href='#filedescriptorsetpos' class='regular pre-open'> #setPos </a></li> <li><a href='#filedescriptorread' class='regular pre-open'> #read </a></li> <li><a href='#filedescriptorwrite' class='regular pre-open'> #write </a></li> </ul> </div> </li> <li><a href='#filedescriptormanager' class=" toggle-sibling"> FileDescriptorManager <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#filedescriptormanagercreatefd' class='regular pre-open'> #createFd </a></li> <li><a href='#filedescriptormanagergetfd' class='regular pre-open'> #getFd </a></li> <li><a href='#filedescriptormanagerdupfd' class='regular pre-open'> #dupFd </a></li> <li><a href='#filedescriptormanagerdeletefd' class='regular pre-open'> #deleteFd </a></li> </ul> </div> </li> <li><a href='#inodes' class=""> INodes </a> </li> <li><a href='#inode' class=" toggle-sibling"> INode <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#inodegetmetadata' class='regular pre-open'> #getMetadata </a></li> </ul> </div> </li> <li><a href='#file' class=" toggle-sibling"> File <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#filegetdata' class='regular pre-open'> #getData </a></li> <li><a href='#filesetdata' class='regular pre-open'> #setData </a></li> <li><a href='#filedestructor' class='regular pre-open'> #destructor </a></li> </ul> </div> </li> <li><a href='#directory' class=" toggle-sibling"> Directory <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#directorygetentries' class='regular pre-open'> #getEntries </a></li> <li><a href='#directorygetentryindex' class='regular pre-open'> #getEntryIndex </a></li> <li><a href='#directorygetentry' class='regular pre-open'> #getEntry </a></li> <li><a href='#directoryaddentry' class='regular pre-open'> #addEntry </a></li> <li><a href='#directorydeleteentry' class='regular pre-open'> #deleteEntry </a></li> <li><a href='#directoryrenameentry' class='regular pre-open'> #renameEntry </a></li> <li><a href='#directorydestructor' class='regular pre-open'> #destructor </a></li> </ul> </div> </li> <li><a href='#symlink' class=" toggle-sibling"> Symlink <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#symlinkgetlink' class='regular pre-open'> #getLink </a></li> <li><a href='#symlinkdestructor' class='regular pre-open'> #destructor </a></li> </ul> </div> </li> <li><a href='#characterdev' class=""> CharacterDev </a> </li> <li><a href='#inodemanager' class=" toggle-sibling"> INodeManager <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#inodemanagercreateinode' class='regular pre-open'> #createINode </a></li> <li><a href='#inodemanagergetinode' class='regular pre-open'> #getINode </a></li> <li><a href='#inodemanagerlinkinode' class='regular pre-open'> #linkINode </a></li> <li><a href='#inodemanagerunlinkinode' class='regular pre-open'> #unlinkINode </a></li> <li><a href='#inodemanagerrefinode' class='regular pre-open'> #refINode </a></li> <li><a href='#inodemanagerunrefinode' class='regular pre-open'> #unrefINode </a></li> <li><a href='#inodemanager_gcinode' class='regular pre-open'> #_gcINode </a></li> </ul> </div> </li> <li><a href='#permissions' class=""> Permissions </a> </li> <li><a href='#default_root_uid' class=""> DEFAULT_ROOT_UID </a> </li> <li><a href='#default_root_gid' class=""> DEFAULT_ROOT_GID </a> </li> <li><a href='#default_root_perm' class=""> DEFAULT_ROOT_PERM </a> </li> <li><a href='#default_file_perm' class=""> DEFAULT_FILE_PERM </a> </li> <li><a href='#default_directory_perm' class=""> DEFAULT_DIRECTORY_PERM </a> </li> <li><a href='#default_symlink_perm' class=""> DEFAULT_SYMLINK_PERM </a> </li> <li><a href='#applyumask' class=""> applyUmask </a> </li> <li><a href='#resolveownership' class=""> resolveOwnership </a> </li> <li><a href='#checkpermissions' class=""> checkPermissions </a> </li> <li><a href='#stat' class=" toggle-sibling"> Stat <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#statisfile' class='regular pre-open'> #isFile </a></li> <li><a href='#statisdirectory' class='regular pre-open'> #isDirectory </a></li> <li><a href='#statisblockdevice' class='regular pre-open'> #isBlockDevice </a></li> <li><a href='#statischaracterdevice' class='regular pre-open'> #isCharacterDevice </a></li> <li><a href='#statissymboliclink' class='regular pre-open'> #isSymbolicLink </a></li> <li><a href='#statisfifo' class='regular pre-open'> #isFIFO </a></li> <li><a href='#statissocket' class='regular pre-open'> #isSocket </a></li> </ul> </div> </li> <li><a href='#stat' class=" toggle-sibling"> Stat <span class='icon'>▸</span> </a> <div class='toggle-target display-none'> <ul class='list-reset py1-ul pl1'> <li class='h5'><span>Instance members</span></li> <li><a href='#statisfile' class='regular pre-open'> #isFile </a></li> <li><a href='#statisdirectory' class='regular pre-open'> #isDirectory </a></li> <li><a href='#statisblockdevice' class='regular pre-open'> #isBlockDevice </a></li> <li><a href='#statischaracterdevice' class='regular pre-open'> #isCharacterDevice </a></li> <li><a href='#statissymboliclink' class='regular pre-open'> #isSymbolicLink </a></li> <li><a href='#statisfifo' class='regular pre-open'> #isFIFO </a></li> <li><a href='#statissocket' class='regular pre-open'> #isSocket </a></li> </ul> </div> </li> <li><a href='#streams' class=""> Streams </a> </li> <li><a href='#readstream' class=""> ReadStream </a> </li> <li><a href='#writestream' class=""> WriteStream </a> </li> <li><a href='#virtualfs' class=""> VirtualFS </a> </li> <li><a href='#virtualfs' class=""> VirtualFS </a> </li> <li><a href='#pathjoin' class=""> pathJoin </a> </li> <li><a href='#callbackup' class=""> callbackUp </a> </li> <li><a href='#virtualfserror' class=""> VirtualFSError </a> </li> <li><a href='#virtualfserror' class=""> VirtualFSError </a> </li> <li><a href='#virtualfssingleton' class=""> VirtualFSSingleton </a> </li> </ul> </div> <div class='mt1 h6 quiet'> <a href='http://documentation.js.org/reading-documentation.html'>Need help reading this?</a> </div> </div> </div> <div id='split-right' class='relative overflow-auto height-viewport-100'> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='currentdirectory'> CurrentDirectory </h3> </div> <div class='pre p1 fill-light mt0'>CurrentDirectory</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='devices'> Devices </h3> </div> <div class='pre p1 fill-light mt0'>Devices</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='full'> Full </h3> </div> <div class='pre p1 fill-light mt0'>Full</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='null'> Null </h3> </div> <div class='pre p1 fill-light mt0'>Null</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='random'> Random </h3> </div> <div class='pre p1 fill-light mt0'>Random</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='tty'> Tty </h3> </div> <div class='pre p1 fill-light mt0'>Tty</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='zero'> Zero </h3> </div> <div class='pre p1 fill-light mt0'>Zero</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='filedescriptors'> FileDescriptors </h3> </div> <div class='pre p1 fill-light mt0'>FileDescriptors</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='filedescriptor'> FileDescriptor </h3> </div> <p>Class representing a File Descriptor</p> <div class='pre p1 fill-light mt0'>new FileDescriptor(iNode: I, flags: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>(I)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>flags</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='filedescriptorgetinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getINode()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets an INode.</p> <div class='pre p1 fill-light mt0'>getINode(): I</div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>I</code> </section> </div> </div> <div class='border-bottom' id='filedescriptorgetflags'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getFlags()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the file descriptor flags. Unlike Linux filesystems, this retains creation and status flags.</p> <div class='pre p1 fill-light mt0'>getFlags(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> </section> </div> </div> <div class='border-bottom' id='filedescriptorsetflags'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>setFlags(flags)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Sets the file descriptor flags.</p> <div class='pre p1 fill-light mt0'>setFlags(flags: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>flags</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='filedescriptorgetpos'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getPos()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the file descriptor position.</p> <div class='pre p1 fill-light mt0'>getPos(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> </section> </div> </div> <div class='border-bottom' id='filedescriptorsetpos'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>setPos(pos, flags)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Sets the file descriptor position.</p> <div class='pre p1 fill-light mt0'>setPos(pos: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, flags: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>pos</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>flags</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> = <code>constants.SEEK_SET</code>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='filedescriptorread'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>read(buffer, position)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Reads from this file descriptor into a buffer. It will always try to fill the input buffer. If position is specified, the position change does not persist. If the current file descriptor position is greater than or equal to the length of the data, this will read 0 bytes.</p> <div class='pre p1 fill-light mt0'>read(buffer: <a href="https://nodejs.org/api/buffer.html">Buffer</a>, position: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | null)): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>buffer</span> <code class='quiet'>(<a href="https://nodejs.org/api/buffer.html">Buffer</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>position</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | null) = <code>null</code>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> </section> </div> </div> <div class='border-bottom' id='filedescriptorwrite'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>write(buffer, position, extraFlags)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Writes to this file descriptor. If position is specified, the position change does not persist.</p> <div class='pre p1 fill-light mt0'>write(buffer: <a href="https://nodejs.org/api/buffer.html">Buffer</a>, position: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | null), extraFlags: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>buffer</span> <code class='quiet'>(<a href="https://nodejs.org/api/buffer.html">Buffer</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>position</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | null) = <code>null</code>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>extraFlags</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> = <code>0</code>)</code> </div> </div> </div> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='filedescriptormanager'> FileDescriptorManager </h3> </div> <p>Class that manages all FileDescriptors</p> <div class='pre p1 fill-light mt0'>new FileDescriptorManager(iNodeMgr: <a href="#inodemanager">INodeManager</a>)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='filedescriptormanagercreatefd'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>createFd(iNode, flags)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Creates a file descriptor. This will increment the reference to the iNode preventing garbage collection by the INodeManager.</p> <div class='pre p1 fill-light mt0'>createFd(iNode: $Subtype<<a href="#inode">INode</a>>, flags: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): [<a href="#filedescriptor">FileDescriptor</a><any>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>($Subtype<<a href="#inode">INode</a>>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>flags</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>[<a href="#filedescriptor">FileDescriptor</a><any>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]</code> </section> </div> </div> <div class='border-bottom' id='filedescriptormanagergetfd'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getFd(index)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the file descriptor object.</p> <div class='pre p1 fill-light mt0'>getFd(index: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="#filedescriptor">FileDescriptor</a><any>?</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>index</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="#filedescriptor">FileDescriptor</a><any>?</code> </section> </div> </div> <div class='border-bottom' id='filedescriptormanagerdupfd'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>dupFd(index)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Duplicates file descriptor index. It may return a new file descriptor index that points to the same file descriptor.</p> <div class='pre p1 fill-light mt0'>dupFd(index: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>index</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?</code> </section> </div> </div> <div class='border-bottom' id='filedescriptormanagerdeletefd'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>deleteFd(fdIndex)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Deletes a file descriptor. This effectively closes the file descriptor. This will decrement the reference to the iNode allowing garbage collection by the INodeManager.</p> <div class='pre p1 fill-light mt0'>deleteFd(fdIndex: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>fdIndex</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='inodes'> INodes </h3> </div> <div class='pre p1 fill-light mt0'>INodes</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='inode'> INode </h3> </div> <p>Class representing an iNode.</p> <div class='pre p1 fill-light mt0'>new INode(metadata: {ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, nlink: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?, size: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}, iNodeMgr: <a href="#inodemanager">INodeManager</a>)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>metadata</span> <code class='quiet'>({ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, nlink: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?, size: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>})</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='inodegetmetadata'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getMetadata()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the Stat metadata instance.</p> <div class='pre p1 fill-light mt0'>getMetadata(): <a href="#stat">Stat</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="#stat">Stat</a></code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='file'> File </h3> </div> <p>Class representing a file.</p> <div class='pre p1 fill-light mt0'>new File(props: {ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, data: <a href="https://nodejs.org/api/buffer.html">Buffer</a>?}, iNodeMgr: <a href="#inodemanager">INodeManager</a>)</div> <p> Extends <a href="#inode">INode</a> </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>props</span> <code class='quiet'>({ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, data: <a href="https://nodejs.org/api/buffer.html">Buffer</a>?})</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='filegetdata'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getData()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the file buffer.</p> <div class='pre p1 fill-light mt0'>getData(): <a href="https://nodejs.org/api/buffer.html">Buffer</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://nodejs.org/api/buffer.html">Buffer</a></code> </section> </div> </div> <div class='border-bottom' id='filesetdata'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>setData(data)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Sets the file buffer.</p> <div class='pre p1 fill-light mt0'>setData(data: <a href="https://nodejs.org/api/buffer.html">Buffer</a>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>data</span> <code class='quiet'>(<a href="https://nodejs.org/api/buffer.html">Buffer</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='filedestructor'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>destructor()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Noop.</p> <div class='pre p1 fill-light mt0'>destructor(): void</div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='directory'> Directory </h3> </div> <p>Class representing a directory.</p> <div class='pre p1 fill-light mt0'>new Directory(props: {ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, parent: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?}, iNodeMgr: <a href="#inodemanager">INodeManager</a>)</div> <p> Extends <a href="#inode">INode</a> </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>props</span> <code class='quiet'>({ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, parent: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?})</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='directorygetentries'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getEntries()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets an iterator of name to iNode index. This prevents giving out mutability.</p> <div class='pre p1 fill-light mt0'>getEntries(): Iterator<[<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>Iterator<[<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]></code> </section> </div> </div> <div class='border-bottom' id='directorygetentryindex'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getEntryIndex(name)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Get the inode index for a name.</p> <div class='pre p1 fill-light mt0'>getEntryIndex(name: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>name</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>?</code> </section> </div> </div> <div class='border-bottom' id='directorygetentry'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getEntry(name)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Get inode for a name.</p> <div class='pre p1 fill-light mt0'>getEntry(name: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): ($Subtype<<a href="#inode">INode</a>> | void)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>name</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>($Subtype<<a href="#inode">INode</a>> | void)</code> </section> </div> </div> <div class='border-bottom' id='directoryaddentry'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>addEntry(name, index)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Add a name to inode index to this directory. It will increment the link reference to the inode. It is not allowed to add entries with the names <code>.</code> and <code>..</code>.</p> <div class='pre p1 fill-light mt0'>addEntry(name: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, index: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>name</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>index</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> </section> </div> </div> <div class='border-bottom' id='directorydeleteentry'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>deleteEntry(name)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Delete a name in this directory. It will decrement the link reference to the inode. It is not allowed to delete entries with the names <code>.</code> and <code>..</code>.</p> <div class='pre p1 fill-light mt0'>deleteEntry(name: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>name</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='directoryrenameentry'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>renameEntry(oldName, newName)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Rename a name in this directory.</p> <div class='pre p1 fill-light mt0'>renameEntry(oldName: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, newName: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>oldName</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>newName</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='directorydestructor'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>destructor()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>This is to be called when all hardlinks and references to this directory reduce to 0. The destructor here is about unlinking the parent directory. Because the <code>..</code> will no longer exist.</p> <div class='pre p1 fill-light mt0'>destructor(): void</div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='symlink'> Symlink </h3> </div> <p>Class representing a Symlink.</p> <div class='pre p1 fill-light mt0'>new Symlink(props: {ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, link: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}, iNodeMgr: <a href="#inodemanager">INodeManager</a>)</div> <p> Extends <a href="#inode">INode</a> </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>props</span> <code class='quiet'>({ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, link: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>})</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='symlinkgetlink'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getLink()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the link string.</p> <div class='pre p1 fill-light mt0'>getLink(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> </section> </div> </div> <div class='border-bottom' id='symlinkdestructor'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>destructor()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Noop.</p> <div class='pre p1 fill-light mt0'>destructor(): void</div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='characterdev'> CharacterDev </h3> </div> <p>Class representing a character device.</p> <div class='pre p1 fill-light mt0'>new CharacterDev(props: {ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, rdev: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}, iNodeMgr: <a href="#inodemanager">INodeManager</a>)</div> <p> Extends <a href="#inode">INode</a> </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>props</span> <code class='quiet'>({ino: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, mode: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, rdev: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>})</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a>)</code> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='inodemanager'> INodeManager </h3> </div> <p>Class that manages all iNodes including creation and deletion</p> <div class='pre p1 fill-light mt0'>new INodeManager(devMgr: DeviceManager)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>devMgr</span> <code class='quiet'>(DeviceManager)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='inodemanagercreateinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>createINode(iNodeConstructor, props)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Creates an inode, from a INode constructor function. The returned inode must be used and later manually deallocated.</p> <div class='pre p1 fill-light mt0'>createINode(iNodeConstructor: Class<<a href="#inode">INode</a>>, props: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>): [$Subtype<<a href="#inode">INode</a>>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNodeConstructor</span> <code class='quiet'>(Class<<a href="#inode">INode</a>>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>props</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a> = <code>{}</code>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>[$Subtype<<a href="#inode">INode</a>>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>]</code> </section> </div> </div> <div class='border-bottom' id='inodemanagergetinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>getINode(index)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Gets the inode.</p> <div class='pre p1 fill-light mt0'>getINode(index: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): ($Subtype<<a href="#inode">INode</a>> | void)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>index</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>($Subtype<<a href="#inode">INode</a>> | void)</code> </section> </div> </div> <div class='border-bottom' id='inodemanagerlinkinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>linkINode(iNode)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Links an inode, this increments the hardlink reference count.</p> <div class='pre p1 fill-light mt0'>linkINode(iNode: $Subtype<<a href="#inode">INode</a>>?): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>($Subtype<<a href="#inode">INode</a>>?)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='inodemanagerunlinkinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>unlinkINode(iNode)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Unlinks an inode, this decrements the hardlink reference count.</p> <div class='pre p1 fill-light mt0'>unlinkINode(iNode: $Subtype<<a href="#inode">INode</a>>?): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>($Subtype<<a href="#inode">INode</a>>?)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='inodemanagerrefinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>refINode(iNode)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>References an inode, this increments the private reference count. Private reference count can be used by file descriptors and working directory position.</p> <div class='pre p1 fill-light mt0'>refINode(iNode: $Subtype<<a href="#inode">INode</a>>?): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>($Subtype<<a href="#inode">INode</a>>?)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='inodemanagerunrefinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>unrefINode(iNode)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Unreferences an inode, this decrements the private reference count.</p> <div class='pre p1 fill-light mt0'>unrefINode(iNode: $Subtype<<a href="#inode">INode</a>>?): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>($Subtype<<a href="#inode">INode</a>>?)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> <div class='border-bottom' id='inodemanager_gcinode'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>_gcINode(iNode)</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Decides whether to garbage collect the inode. The true usage count is the hardlink count plus the private reference count. Usually if the true usage count is 0, then the inode is garbage collected. However directories are special cased here, due to the <code>.</code> circular hardlink. This allows directories to be garbage collected even when their usage count is 1. This is possible also because there cannot be custom hardlinks to directories.</p> <div class='pre p1 fill-light mt0'>_gcINode(iNode: $Subtype<<a href="#inode">INode</a>>): void</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>iNode</span> <code class='quiet'>($Subtype<<a href="#inode">INode</a>>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code>void</code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='permissions'> Permissions </h3> </div> <div class='pre p1 fill-light mt0'>Permissions</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='default_root_uid'> DEFAULT_ROOT_UID </h3> </div> <p>Default root uid.</p> <div class='pre p1 fill-light mt0'>DEFAULT_ROOT_UID</div> <p> Type: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> </p> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='default_root_gid'> DEFAULT_ROOT_GID </h3> </div> <p>Default root gid.</p> <div class='pre p1 fill-light mt0'>DEFAULT_ROOT_GID</div> <p> Type: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> </p> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='default_root_perm'> DEFAULT_ROOT_PERM </h3> </div> <p>Default root directory permissions of <code>rwxr-xr-x</code>.</p> <div class='pre p1 fill-light mt0'>DEFAULT_ROOT_PERM</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='default_file_perm'> DEFAULT_FILE_PERM </h3> </div> <p>Default file permissions of <code>rw-rw-rw-</code>.</p> <div class='pre p1 fill-light mt0'>DEFAULT_FILE_PERM</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='default_directory_perm'> DEFAULT_DIRECTORY_PERM </h3> </div> <p>Default directory permissions of <code>rwxrwxrwx</code>.</p> <div class='pre p1 fill-light mt0'>DEFAULT_DIRECTORY_PERM</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='default_symlink_perm'> DEFAULT_SYMLINK_PERM </h3> </div> <p>Default symlink permissions of <code>rwxrwxrwx</code>.</p> <div class='pre p1 fill-light mt0'>DEFAULT_SYMLINK_PERM</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='applyumask'> applyUmask </h3> </div> <p>Applies umask to default set of permissions.</p> <div class='pre p1 fill-light mt0'>applyUmask(perms: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, umask: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>perms</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>umask</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='resolveownership'> resolveOwnership </h3> </div> <p>Permission checking relies on ownership details of the iNode. If the accessing user is the same as the iNode user, then only user permissions are used. If the accessing group is the same as the iNode group, then only the group permissions are used. Otherwise the other permissions are used.</p> <div class='pre p1 fill-light mt0'>resolveOwnership(uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, stat: <a href="#stat">Stat</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>uid</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>gid</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>stat</span> <code class='quiet'>(<a href="#stat">Stat</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='checkpermissions'> checkPermissions </h3> </div> <p>Checks the desired permissions with user id and group id against the metadata of an iNode. The desired permissions can be bitwise combinations of constants.R_OK, constants.W_OK and constants.X_OK.</p> <div class='pre p1 fill-light mt0'>checkPermissions(access: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, uid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, gid: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, stat: <a href="#stat">Stat</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>access</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>uid</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>gid</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>stat</span> <code class='quiet'>(<a href="#stat">Stat</a>)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='stat'> Stat </h3> </div> <div class='pre p1 fill-light mt0'>Stat</div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='statisfile'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isFile()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if file.</p> <div class='pre p1 fill-light mt0'>isFile(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statisdirectory'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isDirectory()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if directory.</p> <div class='pre p1 fill-light mt0'>isDirectory(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statisblockdevice'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isBlockDevice()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if block device.</p> <div class='pre p1 fill-light mt0'>isBlockDevice(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statischaracterdevice'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isCharacterDevice()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if character device.</p> <div class='pre p1 fill-light mt0'>isCharacterDevice(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statissymboliclink'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isSymbolicLink()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if symbolic link.</p> <div class='pre p1 fill-light mt0'>isSymbolicLink(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statisfifo'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isFIFO()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if FIFO.</p> <div class='pre p1 fill-light mt0'>isFIFO(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statissocket'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isSocket()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if socket.</p> <div class='pre p1 fill-light mt0'>isSocket(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='stat'> Stat </h3> </div> <p>Class representing Stat metadata.</p> <div class='pre p1 fill-light mt0'>new Stat(props: Metadata)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>props</span> <code class='quiet'>(Metadata)</code> </div> </div> </div> <div class='py1 quiet mt1 prose-big'>Instance Members</div> <div class="clearfix"> <div class='border-bottom' id='statisfile'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isFile()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if file.</p> <div class='pre p1 fill-light mt0'>isFile(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statisdirectory'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isDirectory()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if directory.</p> <div class='pre p1 fill-light mt0'>isDirectory(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statisblockdevice'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isBlockDevice()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if block device.</p> <div class='pre p1 fill-light mt0'>isBlockDevice(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statischaracterdevice'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isCharacterDevice()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if character device.</p> <div class='pre p1 fill-light mt0'>isCharacterDevice(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statissymboliclink'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isSymbolicLink()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if symbolic link.</p> <div class='pre p1 fill-light mt0'>isSymbolicLink(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statisfifo'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isFIFO()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if FIFO.</p> <div class='pre p1 fill-light mt0'>isFIFO(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> <div class='border-bottom' id='statissocket'> <div class="clearfix small pointer toggle-sibling"> <div class="py1 contain"> <a class='icon pin-right py1 dark-link caret-right'>▸</a> <span class='code strong strong truncate'>isSocket()</span> </div> </div> <div class="clearfix display-none toggle-target"> <section class='p2 mb2 clearfix bg-white minishadow'> <p>Checks if socket.</p> <div class='pre p1 fill-light mt0'>isSocket(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div> <div class='py1 quiet mt1 prose-big'>Returns</div> <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> </section> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='streams'> Streams </h3> </div> <div class='pre p1 fill-light mt0'>Streams</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='readstream'> ReadStream </h3> </div> <p>Class representing a ReadStream.</p> <div class='pre p1 fill-light mt0'>new ReadStream(path: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, options: optionsStream, fs: <a href="#virtualfs">VirtualFS</a>)</div> <p> Extends Readable </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>path</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>options</span> <code class='quiet'>(optionsStream)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>fs</span> <code class='quiet'>(<a href="#virtualfs">VirtualFS</a>)</code> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='writestream'> WriteStream </h3> </div> <p>Class representing a WriteStream.</p> <div class='pre p1 fill-light mt0'>new WriteStream(path: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, options: optionsStream, fs: <a href="#virtualfs">VirtualFS</a>)</div> <p> Extends Writable </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>path</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>options</span> <code class='quiet'>(optionsStream)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>fs</span> <code class='quiet'>(<a href="#virtualfs">VirtualFS</a>)</code> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='virtualfs'> VirtualFS </h3> </div> <div class='pre p1 fill-light mt0'>VirtualFS</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='virtualfs'> VirtualFS </h3> </div> <p>Class representing a virtual filesystem.</p> <div class='pre p1 fill-light mt0'>new VirtualFS(umask: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, rootIndex: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | null), devMgr: DeviceManager, iNodeMgr: <a href="#inodemanager">INodeManager</a>, fdMgr: <a href="#filedescriptormanager">FileDescriptorManager</a>)</div> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>umask</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> = <code>0o022</code>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>rootIndex</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | null) = <code>null</code>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>devMgr</span> <code class='quiet'>(DeviceManager = <code>new DeviceManager()</code>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>iNodeMgr</span> <code class='quiet'>(<a href="#inodemanager">INodeManager</a> = <code>new INodeManager(devMgr)</code>)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>fdMgr</span> <code class='quiet'>(<a href="#filedescriptormanager">FileDescriptorManager</a> = <code>new FileDescriptorManager(iNodeMgr)</code>)</code> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='pathjoin'> pathJoin </h3> </div> <p>Prefer the posix join function if it exists. Browser polyfills of the path module may not have the posix property.</p> <div class='pre p1 fill-light mt0'>pathJoin</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='callbackup'> callbackUp </h3> </div> <p>Asynchronous callback backup.</p> <div class='pre p1 fill-light mt0'>callbackUp</div> <p> Type: callback </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>err</span> <code class='quiet'>(any)</code> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='virtualfserror'> VirtualFSError </h3> </div> <p>Class representing a file system error.</p> <div class='pre p1 fill-light mt0'>new VirtualFSError(errnoObj: {errno: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, code: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, description: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>}, path: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>?, dest: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>?, syscall: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>?)</div> <p> Extends <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a> </p> <div class='py1 quiet mt1 prose-big'>Parameters</div> <div class='prose'> <div class='space-bottom0'> <div> <span class='code bold'>errnoObj</span> <code class='quiet'>({errno: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>, code: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, description: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>})</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>path</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>?)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>dest</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>?)</code> </div> </div> <div class='space-bottom0'> <div> <span class='code bold'>syscall</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>?)</code> </div> </div> </div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='virtualfserror'> VirtualFSError </h3> </div> <div class='pre p1 fill-light mt0'>VirtualFSError</div> </section> <section class='p2 mb2 clearfix bg-white minishadow'> <div class='clearfix'> <h3 class='fl m0' id='virtualfssingleton'> VirtualFSSingleton </h3> </div> <div class='pre p1 fill-light mt0'>VirtualFSSingleton</div> </section> </div> </div> <script src='assets/anchor.js'></script> <script src='assets/split.js'></script> <script src='assets/site.js'></script> </body> </html>