+NAME("ftp").
+VSN("ubf1.0").
+INFO("I am a min ftp server").
+DESCRIPTION("The mini ftp server is a
allows only list, get and tiem last modified
").
+TYPE password() = string().
+TYPE file() = string().
+TYPE year() = int().
+TYPE month() = int().
+TYPE day() = int().
+TYPE hour() = int().
+TYPE min() = int().
+TYPE sec() = int().
+TYPE time() = {year(), month(), day(), hour(), min(), sec()}.
+STATE start
{logon, password()} => ok & active
| error & stop.
+STATE active
ls => {files, [string()]} & active;
{timeLastModified, file()} => time() & active
| noSuchFile & stop;
{get, file()} => binary() & active
| noSuchFile & stop;
{put, file(), binary()} => ok & active
| fileNameInUse & stop;
stop => void() & stop.
|