cosFileTransferApp(3)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– cosFileTransferApp πŸ’–

okay bestie, so this is cosFileTransferApp(3) β€” the main character of the cosFileTransfer application, from the Erlang Module Definition crew. she's the one who handles the starting and the stopping, and honestly? she ate. let's get into it 🫢


✨ NAME ✨

cosFileTransferApp β€” literally THE main module of the cosFileTransfer application. that's her. that's the whole vibe. πŸ’…


🌸 DESCRIPTION 🌸

so, to get access to the record definitions for the structures, you use:

-include_lib("cosFileTransfer/include/*.hrl").

and this module contains the functions for starting and stopping the application. that's it, that's the job, no cap. ✨


πŸŽ€ EXPORTS πŸŽ€

πŸ’« install() -> Return

Types:

Return = ok | {'EXIT', Reason}

this operation installs the cosFileTransfer application. πŸ”₯

heads up bestie!! the cosProperty application must be installed prior to invoking this operation. do not skip this step, she will not be chill about it 😭

πŸ’« uninstall() -> Return

Types:

Return = ok | {'EXIT', Reason}

this operation uninstalls the cosFileTransfer application. bye bye, we loved her, she served πŸ’…

πŸ’« start() -> Return

Types:

Return = ok | {error, Reason}

this operation starts the cosFileTransfer application. go go go πŸƒβ™€οΈβœ¨

πŸ’« stop() -> Return

Types:

Return = ok | {error, Reason}

this operation stops the cosFileTransfer application. rest era πŸ›ŒπŸ’œ


πŸ‘‘ create_VFS(Type, Content, Host, Port [,Options]) -> Return

Types:

Type = 'FTP' | {'NATIVE', 'cosFileTransferNATIVE_file'} |
{'NATIVE', MyModule}
Content = []
Host = string(), e.g. "myHost@myServer" or "012.345.678.910"
Port = integer()
Options = [Option]
Option = {protocol, Protocol} | {connect_timeout, Seconds}
Protocol = tcp | ssl
Return = VFS | {'EXCEPTION, E}
VFS = #objref

okay so THIS one creates a brand new instance of a Virtual File System. iconic behaviour honestly 🌈

the Type parameter determines which type we want the VFS to represent:

  • 'FTP' maps to the INETS ftp implementation
  • {'NATIVE', 'cosFileTransferNATIVE_file'} uses the file module
  • you can also implement your own mappings, which get activated by supplying {'NATIVE', MyModule}. and listen β€” the MyModule module must export the same functions and behave in the same way as the INETS ftp module, plus an operation named open(Host, Port), which shall return {ok, Pid} or {error, Reason}. no shortcuts, bestie 🎯

if no Options are supplied, the default setting will be used, i.e., tcp and 60 seconds. lowkey generous of her πŸ’…

and the Content parameter is currently ignored by must be supplied as an empty list. yes you read that right, she ignores it but she still wants it. main character energy fr fr πŸ™ˆ


πŸ” ssl_server_certfile() -> string()

this function returns a path to a file containing a chain of PEM encoded certificates for the cosFileTransfer as target. this is configured by setting the application variable ssl_server_certfile. πŸŽ€

πŸ” ssl_client_certfile() -> string()

this function returns a path to a file containing a chain of PEM encoded certificates used in outgoing calls. the default value is configured by setting the application variable ssl_client_certfile. πŸ’Œ

πŸ” ssl_server_verify() -> 0 | 1 | 2

this function returns the type of verification used by SSL during authentication of the other peer for incoming calls. it is configured by setting the application variable ssl_server_verify. πŸ•΅οΈβ™€οΈ

πŸ” ssl_client_verify() -> 0 | 1 | 2

this function returns the type of verification used by SSL during authentication of the other peer for outgoing calls. the default value is configured by setting the application variable ssl_client_verify. πŸ•΅οΈβ™€οΈ

πŸ” ssl_server_depth() -> int()

this function returns the SSL verification depth for incoming calls. it is configured by setting the application variable ssl_server_depth. 🌊

πŸ” ssl_client_depth() -> int()

this function returns the SSL verification depth for outgoing calls. the default value is configured by setting the application variable ssl_client_depth. 🌊


and that's the whole page, bestie!! every flag, every type, every variable β€” all accounted for, we don't gatekeep here πŸ’–

this lil gem comes courtesy of Ericsson AB, cosFileTransfer version 5.2.2, and it's the cosFileTransferApp(3) page β€” go forth and virtual-file-system responsibly, mwah πŸ’‹βœ¨πŸ¦‹

πŸ“¦ where this page comes from