Packages

A Gleam FTP/FTPS client library with full RFC support for both passive and active mode

Current section

Files

Jump to
gftp src gftp@command@protection_level.erl
Raw

src/gftp@command@protection_level.erl

-module(gftp@command@protection_level).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/gftp/command/protection_level.gleam").
-export([to_string/1]).
-export_type([protection_level/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
-type protection_level() :: clear | private.
-file("src/gftp/command/protection_level.gleam", 8).
?DOC(" Convert a `ProtectionLevel` to its string representation for the `PROT` command.\n").
-spec to_string(protection_level()) -> binary().
to_string(Prot) ->
case Prot of
clear ->
<<"C"/utf8>>;
private ->
<<"P"/utf8>>
end.