LibClang-3.4.0: Haskell bindings for libclang (a C++ parsing library)

Safe HaskellNone
LanguageHaskell2010

Clang.UnsavedFile

Contents

Description

Functions for working with unsaved files.

Unsaved files are used to represent files which are in memory, but haven't yet been written to disk. You'll need to use unsaved files for situations like supporting autocomplete in an editor without requiring the user to save for up-to-date completions. See Clang.TranslationUnit for details about using unsaved files.

This module is intended to be imported qualified.

Synopsis

Creating an unsaved file

new :: ByteString -> ByteString -> UnsavedFile Source

Create a new unsaved file.

Field accessors

filename :: UnsavedFile -> ByteString Source

Retrieve the filename of an unsaved file.

contents :: UnsavedFile -> ByteString Source

Retrieve the contents of an unsaved file.

Updates

updateContents :: UnsavedFile -> ByteString -> UnsavedFile Source

Update the contents of an unsaved file. This is more efficient than creating a new unsaved file with the same filename.