gopher-type ( entry -- type )


Vocabulary
gopher.server.private

Inputs
entryan object


Outputs
typean object


Definition


: gopher-type ( entry -- type )
dup type>> {
{ +directory+ [ drop "1" ] }
{
+regular-file+
[
name>> mime-type {
{ ~quotation~ ~quotation~ }
{ ~quotation~ ~quotation~ }
{ ~quotation~ ~quotation~ }
[ drop "9" ]
} cond
]
}
[ 2drop f ]
} case ;