Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
- new :: ByteString -> ByteString -> UnsavedFile
- filename :: UnsavedFile -> ByteString
- contents :: UnsavedFile -> ByteString
- updateContents :: UnsavedFile -> ByteString -> UnsavedFile
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.