niffler_precompiled/ffi
Typed wrappers around the Erlang FFI module.
Types
pub type HttpResult {
HttpOk(status: Int, body: BitArray)
HttpError(reason: String)
}
Constructors
-
HttpOk(status: Int, body: BitArray) -
HttpError(reason: String)
pub type TarEntry {
TarEntry(name: String, kind: String, size: Int)
}
Constructors
-
TarEntry(name: String, kind: String, size: Int)
Values
pub fn absname(path: String) -> String
pub fn app_version(app: String) -> Result(String, String)
pub fn basename(path: String) -> String
pub fn cwd() -> String
pub fn dirname(path: String) -> String
pub fn ensure_dir(path: String) -> Result(Nil, String)
pub fn env(name: String) -> option.Option(String)
pub fn eprint(message: String) -> Nil
pub fn file_exists(path: String) -> Bool
pub fn file_magic(path: String) -> String
pub fn file_size(path: String) -> Result(Int, String)
pub fn find_executable(name: String) -> option.Option(String)
pub fn halt_vm(code: Int) -> Nil
pub fn hash_tree(directory: String) -> Result(String, String)
pub fn home_dir() -> String
pub fn http_get(
url: String,
allow_insecure: Bool,
ca_bundle: String,
) -> HttpResult
pub fn join_paths(parts: List(String)) -> String
pub fn list_dir(path: String) -> Result(List(String), String)
pub fn nif_version() -> String
pub fn os_type() -> #(String, String)
pub fn otp_release() -> String
pub fn path_separator() -> String
pub fn plain_args() -> List(String)
pub fn print(message: String) -> Nil
pub fn priv_dir(app: String) -> Result(String, String)
pub fn raise(package: String, message: String) -> Nil
pub fn read_file(path: String) -> Result(BitArray, String)
pub fn remove_file(path: String) -> Result(Nil, String)
pub fn remove_tree(path: String) -> Result(Nil, String)
pub fn rename(from: String, to: String) -> Result(Nil, String)
pub fn run(
executable: String,
arguments: List(String),
cwd: String,
) -> #(Int, BitArray)
pub fn set_file_mode(
path: String,
mode: Int,
) -> Result(Nil, String)
pub fn sha256_file_hex(path: String) -> Result(String, String)
pub fn sha256_hex(contents: BitArray) -> String
pub fn sleep(milliseconds: Int) -> Nil
pub fn system_architecture() -> String
pub fn tar_create_single(
name: String,
contents: BitArray,
) -> Result(BitArray, String)
pub fn tar_extract_gz_member(
contents: BitArray,
name: String,
) -> Result(BitArray, String)
pub fn tar_extract_plain_member(
contents: BitArray,
name: String,
) -> Result(BitArray, String)
pub fn tar_inspect_gz(
contents: BitArray,
) -> Result(List(TarEntry), String)
pub fn tar_inspect_plain(
contents: BitArray,
) -> Result(List(TarEntry), String)
pub fn timestamp() -> Int
pub fn unique_id() -> Int
pub fn user_cache_dir(app: String) -> String
pub fn wordsize() -> Int
pub fn write_file(
path: String,
contents: BitArray,
) -> Result(Nil, String)
pub fn write_file_exclusive(
path: String,
contents: BitArray,
) -> Result(Nil, String)