<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ocr.michiyo.me/w/index.php?action=history&amp;feed=atom&amp;title=Component%2Fdrive</id>
	<title>Component/drive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ocr.michiyo.me/w/index.php?action=history&amp;feed=atom&amp;title=Component%2Fdrive"/>
	<link rel="alternate" type="text/html" href="https://ocr.michiyo.me/w/index.php?title=Component/drive&amp;action=history"/>
	<updated>2026-08-24T13:48:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://ocr.michiyo.me/w/index.php?title=Component/drive&amp;diff=1154&amp;oldid=prev</id>
		<title>imported&gt;OCDoc Import: Imported from legacy OpenComputers documentation at ocdoc.cil.li</title>
		<link rel="alternate" type="text/html" href="https://ocr.michiyo.me/w/index.php?title=Component/drive&amp;diff=1154&amp;oldid=prev"/>
		<updated>2026-08-24T08:08:27Z</updated>

		<summary type="html">&lt;p&gt;Imported from legacy OpenComputers documentation at ocdoc.cil.li&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Component: Drive =&lt;br /&gt;
&lt;br /&gt;
This component is provided by [[Item/floppy disk|Floppy Disks]] or [[Item/hard disk drive|Hard Disk Drives]] in Unmanaged mode (for Managed mode, see [[Component/filesystem|Filesystem]])&lt;br /&gt;
&lt;br /&gt;
To switch a managed drive to Unmanaged mode, just right click with the item in your hand and select Unmanaged mode (Warning: this will wipe the drive).&lt;br /&gt;
&lt;br /&gt;
Component name: `drive`. Callbacks:&lt;br /&gt;
&lt;br /&gt;
* `readByte(offset:number):number`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Read a single byte at the specified offset.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `writeByte(offset:number, value:number)`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Write a single byte to the specified offset.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `getSectorSize():number`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Returns the size of a single sector on the drive, in bytes.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `getLabel():string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Get the current label of the drive.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `setLabel(value:string):string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Sets the label of the drive. Returns the new value, which may be truncated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `readSector(sector:number):string`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Read the current contents of the specified sector.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `writeSector(sector:number, value:string)`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Write the specified contents to the specified sector.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `getPlatterCount():number`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Returns the number of platters in the drive.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* `getCapacity():number`&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Returns the total capacity of the drive, in bytes.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
{{:Component/contents}}&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>imported&gt;OCDoc Import</name></author>
	</entry>
</feed>