This project is read-only.

.NET Micro Framework Tiny File System

Rating: No reviews yet
Downloads: 19
Change Set: 34339
Released: Jan 28, 2015
Updated: Jan 28, 2015 by DukeNukem
Dev status: Stable Help Icon

Recommended Download

Application FileFlashSystem.msi
application, 1156K, uploaded Jan 28, 2015 - 19 downloads

Release Notes

Project Description

Installs a Gadgeteer Module FlashFileSystem which is a very easy to use Flash File System based on the Tiny File System.

Tiny File System provides a lightweight file system that can be overlaid on external memory peripherals such as Flash memory or anything you write a driver for.

Tiny File System Overview

Tiny File System provides a file system over any device for which an IBlockDriver can be written. The file system its self is a Log Structured File System which is ideally suited to flash memory devices especially small scale devices which do not have hardware support to wear leveling.

The file system comes with a MemoryBlockDriver which can be used for testing of the interfaces. This driver is based off of non-persistent memory so is not suited for production use.

The file system exposes two classes, one is the TinyFileSystem class and the other is the TinyFileStream. TinyFileSystem provides the necessary functions to Format a device, mount an existing file system from a device, create, open, delete, copy and rename files and more.

The TinyFileStream exposes files created/opened from the file system as a stream. Most stream functionality works as expected. The one exception is that SetLength does not currently allow you to grow the file, this is not a design limitation of the file system, in fact it is quite easy to implement on the current design and will be done eventually.

In addition to the above, the code contains a direct port of the BufferedStream found in the Mono project. The buffered stream is not required for the functionality of the file system, but is useful to optimize writes to the file system. TinyFileStream writes every change directly to the file system which is efficient if you are writing blocks of data at a time, but creates a lot of log entries on the files system which need to be garbage collected. In these scenarios, a BufferedStream can wrap the TinyFileStream to buffer these small writes and write them out in larger chunks.

The file system is optimized for devices which require wear-leveling. For example flash memory which has a defined limit of the number of write cycles it can endure before it begins to fail read/write operations, by implementing a wear-leveling in the file system the wear on the device is evenly distributed to minimize the likelihood of one area of the device being overused and causing the entire device to become unusable due to a few blocks failing while other block on the device are hardly touched.

Note: File names are limited to 16 bytes (16 bytes not characters, file names with multi-byte characters will have fewer than 16 characters).
File names are not case-sensitive when using the Latin characters, however the file names are case sensitive for any non-Latin characters in the name.

Original project by

Project tested with GHI Flash Module

Reviews for this release

No reviews yet for this release.