diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-12-09 18:23:07 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-12-09 18:23:07 +0700 |
commit | 84f891ea3e31c936bc990a3c2310d539df62fc44 (patch) | |
tree | d925c137ac5fb9cf476943dfa933e3be039147bf /lib/pleroma/utils.ex | |
parent | a75d4a41e03979b4d1b9af5205e457d714ff76df (diff) | |
download | pleroma-84f891ea3e31c936bc990a3c2310d539df62fc44.tar.gz |
Add Pleroma.Utils.compile_dir/1
Diffstat (limited to 'lib/pleroma/utils.ex')
-rw-r--r-- | lib/pleroma/utils.ex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/pleroma/utils.ex b/lib/pleroma/utils.ex new file mode 100644 index 000000000..8d36a0001 --- /dev/null +++ b/lib/pleroma/utils.ex @@ -0,0 +1,12 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Utils do + def compile_dir(dir) when is_binary(dir) do + dir + |> File.ls!() + |> Enum.map(&Path.join(dir, &1)) + |> Kernel.ParallelCompiler.compile() + end +end |