MissingH-1.4.0.1: Large utility library

CopyrightCopyright (C) 2004-2011 John Goerzen
LicenseBSD3
MaintainerJohn Goerzen <jgoerzen@complete.org>
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

System.IO.HVFS.InstanceHelpers

Contents

Description

Utilities for creating instances of the items defined in System.IO.HVFS.

Synopsis

HVFSStat objects

HVFS objects & types

MemoryVFS

data MemoryVFS Source #

An in-memory read/write filesystem. Think of it as a dynamically resizable ramdisk written in Haskell.

Instances

Show MemoryVFS Source # 
HVFSOpenable MemoryVFS Source # 
HVFS MemoryVFS Source # 

newMemoryVFS :: [MemoryNode] -> IO MemoryVFS Source #

Create a new MemoryVFS object from an existing tree. An empty filesystem may be created by using [] for the parameter.

newMemoryVFSRef :: IORef [MemoryNode] -> IO MemoryVFS Source #

Create a new MemoryVFS object using an IORef to an existing tree.

type MemoryNode = (String, MemoryEntry) Source #

The basic node of a MemoryVFS. The String corresponds to the filename, and the entry to the contents.

Utilities

nice_slice :: String -> [String] Source #

Similar to NameManip but the first element won't be /.

nice_slice "/" -> []
nice_slice "/foo/bar" -> ["foo", "bar"]

getFullPath :: HVFS a => a -> String -> IO String Source #

Gets a full path, after investigating the cwd.

getFullSlice :: HVFS a => a -> String -> IO [String] Source #

Gets the full path via getFullPath, then splits it via nice_slice.