You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
9.2 KiB
13 lines
9.2 KiB
5 years ago
|
<!DOCTYPE html>
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferBase__SourceFile (InferBase.InferBase__SourceFile)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> — <span class="package">package <a href="../index.html">InferBase</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferBase__SourceFile</span></h1></header><div class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>t</code><code></code><code></code></div><div class="doc"></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare"><a href="#val-compare" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> <a href="index.html#type-t">t</a> <span class="keyword">‑></span> int</code></div><div class="doc"></div></div></details></div><div class="spec module" id="module-Map"><a href="#module-Map" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>Map : <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Map.S<span class="keyword"> with </span><span class="keyword">type </span><a href="index.html#module-Map">Map</a>.key<span class="keyword"> = </span><a href="index.html#type-t">t</a></code></div><div class="doc"><p>Maps from source_file</p></div></div><div class="spec module" id="module-Set"><a href="#module-Set" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>Set : <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Set.S<span class="keyword"> with </span><span class="keyword">type </span><a href="index.html#module-Set">Set</a>.elt<span class="keyword"> = </span><a href="index.html#type-t">t</a></code></div><div class="doc"><p>Set of source files</p></div></div><div class="spec module" id="module-Hash"><a href="#module-Hash" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>Hash : <a href="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Hashtbl.S<span class="keyword"> with </span><span class="keyword">type </span><a href="index.html#module-Hash">Hash</a>.key<span class="keyword"> = </span><a href="index.html#type-t">t</a></code></div><div class="doc"></div></div><div class="spec val" id="val-is_invalid"><a href="#val-is_invalid" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_invalid : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Is the source file the invalid source file?</p></div></div><div class="spec val" id="val-changed_sources_from_changed_files"><a href="#val-changed_sources_from_changed_files" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>changed_sources_from_changed_files : string list <span class="keyword">‑></span> <a href="index.html#module-Set">Set</a>.t</code></div><div class="doc"><p>Set of files read from --changed-files-index file, None if option not specified
|
||
|
NOTE: it may include extra source_files if --changed-files-index contains paths to
|
||
|
header files</p></div></div><div class="spec val" id="val-invalid"><a href="#val-invalid" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>invalid : string <span class="keyword">‑></span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>Invalid source file</p></div></div><div class="spec val" id="val-equal"><a href="#val-equal" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>equal : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> <a href="index.html#type-t">t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>equality of source files</p></div></div><div class="spec val" id="val-from_abs_path"><a href="#val-from_abs_path" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>from_abs_path : ?⁠warn_on_error:bool <span class="keyword">‑></span> string <span class="keyword">‑></span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>create source file from absolute path.
|
||
|
WARNING: If warn_on_error is false, no warning will be shown whenever an error occurs for
|
||
|
the given path (e.g. if it does not exist).</p></div></div><div class="spec val" id="val-create"><a href="#val-create" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>create : ?⁠warn_on_error:bool <span class="keyword">‑></span> string <span class="keyword">‑></span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>Create a SourceFile from a given path. If relative, it assumes it is w.r.t. project root.
|
||
|
WARNING: If warn_on_error is false, no warning will be shown whenever an error occurs for
|
||
|
the given path (e.g. if it does not exist).</p></div></div><div class="spec val" id="val-is_cpp_model"><a href="#val-is_cpp_model" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_cpp_model : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Returns true if the file is a C++ model</p></div></div><div class="spec val" id="val-is_infer_model"><a href="#val-is_infer_model" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_infer_model : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"></div></div><div class="spec val" id="val-is_under_project_root"><a href="#val-is_under_project_root" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_under_project_root : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> bool</code></div><div class="doc"><p>Returns true if the file is in project root</p></div></div><div class="spec val" id="val-line_count"><a href="#val-line_count" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>line_count : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> int</code></div><div class="doc"><p>compute line count of a source file</p></div></div><div class="spec val" id="val-of_header"><a href="#val-of_header" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>of_header : ?⁠warn_on_error:bool <span class="keyword">‑></span> <a href="index.html#type-t">t</a> <span class="keyword">‑></span> <a href="index.html#type-t">t</a> option</code></div><div class="doc"><p>Return approximate source file corresponding to the parameter if it's header file and
|
||
|
file exists. returns None otherwise.
|
||
|
WARNING: If warn_on_error is false, no warning will be shown whenever an error occurs for
|
||
|
the given SourceFile (e.g. if it does not exist).</p></div></div><div class="spec val" id="val-pp"><a href="#val-pp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp : Format.formatter <span class="keyword">‑></span> <a href="index.html#type-t">t</a> <span class="keyword">‑></span> unit</code></div><div class="doc"><p>pretty print t</p></div></div><div class="spec val" id="val-to_abs_path"><a href="#val-to_abs_path" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>to_abs_path : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> string</code></div><div class="doc"><p>get the full path of a source file</p></div></div><div class="spec val" id="val-to_rel_path"><a href="#val-to_rel_path" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>to_rel_path : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> string</code></div><div class="doc"><p>get the relative path of a source file</p></div></div><div class="spec val" id="val-to_string"><a href="#val-to_string" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>to_string : <a href="index.html#type-t">t</a> <span class="keyword">‑></span> string</code></div><div class="doc"><p>convert a source file to a string
|
||
|
WARNING: result may not be valid file path, do not use this function to perform operations
|
||
|
on filenames</p></div></div><div class="spec module" id="module-SQLite"><a href="#module-SQLite" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="SQLite/index.html">SQLite</a> : <a href="../InferBase/SqliteUtils/index.html#module-type-Data">InferBase.SqliteUtils.Data</a><span class="keyword"> with </span><span class="keyword">type </span><a href="../InferBase/SqliteUtils/module-type-Data/index.html#type-t">t</a><span class="keyword"> = </span><a href="index.html#type-t">t</a></code></div><div class="doc"></div></div></body></html>
|