CosFileTra...leIterator(3)
π CosFileTra...leIterator β the Erlang module page, bestie edition
ok so you're looking at CosFileTra...leIterator(3), and yes the name got truncated by the man page formatter, we don't talk about that π. This is an Erlang module definition page, and the module in question is CosFileTransfer_FileIterator. She's a real one, she's part of the OMG world. iykyk. πΈ
β¨ NAME β¨
CosFileTransfer_FileIterator β okay so literally, this module implements the OMG CosFileTransfer::FileIterator interface. That's it, that's the job, and she does it flawlessly. π
π¦ DESCRIPTION π¦
Bestie, listen. To get access to the record definitions for the structures, you use:
-include_lib("cosFileTransfer/include/*.hrl").
no cap, that's the whole vibe. Include it or you're just out here raw-dogging structs and we do NOT do that. π
π EXPORTS π
okay here come the main characters, one by one, slay by slay β¨
π next_one(Iterator) -> Return
Types:
Iterator = #objref
Return = {boolean(), #'CosFileTransfer_FileWrapper'{the_file = File file_type = Type}}
File = #objref
Type = nfile | ndirectory
So this operation is giving peek-at-the-current-spot energy. It returns true if a FileWrapper exists at the current position, and in that case the out parameter contains a valid File reference. Obsessed. π«Ά
But if it returns false, the out parameter is a non-valid FileWrapper β like, don't trust it, it's not your friend, it's a ghost. π» Keep that in mind or you WILL get humbled.
π§ next_n(Iterator, Max) -> Return
Types:
Iterator = #objref
Max = unsigned long()
Return = {boolean(), FileList}
FileList = [#'CosFileTransfer_FileWrapper'{the_file = File file_type = Type}]
File = #objref
Type = nfile | ndirectory
This one is the bulk order version, periodt. It returns true if the requested number of FileWrappers can be delivered and there are additional FileWrappers still chillin' after that. π₯
If false is returned, you get a list β of length Max or less β containing the last valid FileWrappers associated with the target object. So it's not empty, it's not broken, it's just the leftovers and honestly? iconic. π
π destroy(Iterator) -> ok
Types:
Iterator = #objref
This operation terminates the target object. That's it. She said bye, she meant bye, the door is closed, no notes. π β¨
β οΈ quick vibe check:next_onecan hand you a non-validFileWrapperwhen it returnsfalse, so always check that boolean before you go using the out parameter. fr fr. π
and that's the whole page bestie, you ate it, you understood it, you're basically a distributed systems girlie now π
this page came to you from Ericsson AB, covering cosFileTransfer 5.2.2 β so if you ever need to cite your sources, that's the tea, mwah ππ¦πΈ
π¦ where this page comes from
- fedora 43: erlang-cosFileTransfer 1:5.2.2-1.fc43 Β· Apache-2.0
- fedora 44: erlang-cosFileTransfer 1:5.2.2-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms