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

Safe HaskellNone
LanguageHaskell2010

Clang.File

Contents

Description

Functions for manipulating Files, which represent references to files in the libclang AST.

This module is intended to be imported qualified.

Synopsis

Creating files

createFromPath :: ClangBase m => TranslationUnit s' -> FilePath -> ClangT s m (File s) Source

Create a new File value from the provided path.

File properties

getName :: ClangBase m => File s' -> ClangT s m (ClangString s) Source

Retrieve the filename of the given file.

isMultipleIncludeGuarded :: ClangBase m => TranslationUnit s' -> File s'' -> ClangT s m Bool Source

Determines whether the given file is guarded against multiple inclusions, either with the conventional '#ifdef' '#define' '#endif' macro guards or with '#pragma once'.

getMTime :: ClangBase m => File s' -> ClangT s m UTCTime Source

Returns the last modification time of the given file, represented as a UTCTime.

getPosixMTime :: ClangBase m => File s' -> ClangT s m POSIXTime Source

Returns the last modification time of the given file, represented as a POSIXTime.

Unique IDs

getUniqueId :: ClangBase m => File s' -> ClangT s m (Maybe UniqueId) Source

Retrieves a unique ID for the given file. If no unique ID can be generated, returns Nothing.

data UniqueId Source

A unique identifier that can be used to distinguish Files.