If you are interested in tram lines, then you probably want to see tramp-dissect-file-nameor with-parsed-tramp-file-name. eg:.
(tramp-file-name-host (tramp-dissect-file-name path))
, tramp-file-name-real-host.
file-remote-p, ; , :
(file-remote-p path 'host)
( ),