LIBMTP_file_struct(3)

πŸ’– LIBMTP_file_struct(3) β€” the libmtp file struct page, bestie edition πŸ’–

okay so this is a page from the libmtp manual, section 3 (that's the library-functions section, iykyk), and it's literally all about one lil struct. no cap, we're going field by field. grab a strawberry drink πŸ“ and let's go.


✨ NAME ✨

libmtp β€” and bestie, the description slot is empty. nothing. a whole blank. the name is there and the vibe is silence πŸ’€ iconic honestly, we move.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libmtp.h>

πŸŽ€ Data Fields

  • uint32_t item_id
  • uint32_t parent_id
  • uint32_t storage_id
  • char * filename
  • uint64_t filesize
  • time_t modificationdate
  • LIBMTP_filetype_t filetype
  • LIBMTP_file_t * next

that's the whole roster, eight fields deep, and every single one gets its moment below ⬇️


🌸 Detailed Description 🌸

MTP file struct. that's it, that's the description, the whole thing is just MTP file struct and honestly? main character energy. it's a struct. it holds a file. periodt.


πŸ‘‘ Field Documentation πŸ‘‘

(this part is alphabetical, don't come for me, that's just how Doxygen rolls)

🧚 char* LIBMTP_file_struct::filename

the filename of this file. that's the whole job bestie, it holds the name 🫢

Examples: detect.c, and files.c.

Referenced by: LIBMTP_destroy_file_t(), LIBMTP_Send_Track_From_File_Descriptor(), LIBMTP_Send_Track_From_Handler(), and LIBMTP_Set_File_Name().


⭐ uint64_t LIBMTP_file_struct::filesize

the size of the file, measured in bytes. big number energy πŸ”₯

Examples: files.c.

Referenced by: LIBMTP_Get_File_To_File_Descriptor(), LIBMTP_Get_File_To_Handler(), LIBMTP_Send_File_From_File_Descriptor(), LIBMTP_Send_File_From_Handler(), LIBMTP_Send_Track_From_File_Descriptor(), and LIBMTP_Send_Track_From_Handler().


πŸ’… LIBMTP_filetype_t LIBMTP_file_struct::filetype

the filetype used for the current file β€” like, what kind of file are we even dealing with 🌈

Examples: files.c, and tracks.c.

Referenced by: LIBMTP_Get_File_To_File_Descriptor(), LIBMTP_Get_File_To_Handler(), LIBMTP_Send_Track_From_File_Descriptor(), LIBMTP_Send_Track_From_Handler(), LIBMTP_Set_File_Name(), and LIBMTP_Set_Object_Filename().


πŸ¦‹ uint32_t LIBMTP_file_struct::item_id

a unique item ID. one of a kind, no duplicates, that's the whole point πŸ’œ

Examples: detect.c, files.c, and tracks.c.

Referenced by: LIBMTP_Send_File_From_File_Descriptor(), LIBMTP_Send_File_From_Handler(), LIBMTP_Send_Track_From_File_Descriptor(), LIBMTP_Send_Track_From_Handler(), and LIBMTP_Set_File_Name().


πŸŽ€ time_t LIBMTP_file_struct::modificationdate

the date of the last alteration of the file, aka the last time somebody touched it πŸ™ˆ

no examples listed here and no "referenced by" either! this one is lowkey flying solo, just vibing with its description. don't make up extras, bestie, it just has the one line.

πŸ“ LIBMTP_file_t* LIBMTP_file_struct::next

the next file in the list, or NULL if this is the last file. it's giving linked-list slay πŸ”—

Examples: detect.c, files.c, and tracks.c.

Referenced by: LIBMTP_Get_Filelisting_With_Callback(), LIBMTP_Get_Files_And_Folders(), LIBMTP_Send_Track_From_File_Descriptor(), and LIBMTP_Send_Track_From_Handler().


🌈 uint32_t LIBMTP_file_struct::parent_id

the ID of the parent folder. every file's got a parent, that's just facts πŸ’–

Examples: files.c.

Referenced by: LIBMTP_Send_File_From_File_Descriptor(), LIBMTP_Send_File_From_Handler(), LIBMTP_Send_Track_From_File_Descriptor(), and LIBMTP_Send_Track_From_Handler().


πŸ’œ uint32_t LIBMTP_file_struct::storage_id

the ID of the storage that's holding this file. where does it live? this field knows 🫢

Examples: files.c.

Referenced by: LIBMTP_Send_File_From_File_Descriptor(), LIBMTP_Send_File_From_Handler(), LIBMTP_Send_Track_From_File_Descriptor(), and LIBMTP_Send_Track_From_Handler().


🌟 Author 🌟

generated automatically by Doxygen for libmtp from the source code. not a human typing this out at 3am, a robot did it, and we respect the robot πŸ’–


and that's the page!! this whole thing shipped as part of libmtp Version 1.1.23, so if you're citing it, that's the version, bestie πŸŽ€πŸ’…βœ¨ byeee πŸ¦‹

πŸ“¦ where this page comes from