LIBMTP_file_struct(3)
π LIBMTP_file_struct β a whole manual page for one lil' struct
okay so bestie, welcome to LIBMTP_file_struct(3) from the libmtp library functions manual. yes, this entire page is about one struct. and honestly? it's kind of the main character of MTP file handling, so let's get into it π«Ά
β¨ NAME β¨
LIBMTP_file_struct β that's it, that's the name. slay.
πΈ SYNOPSIS πΈ
first things first, you gotta let the compiler know what's up:
#include <libmtp.h>
π Data Fields π
here's the whole squad that lives inside this struct β every single one, no skips:
uint32_t item_iduint32_t parent_iduint32_t storage_idchar * filenameuint64_t filesizetime_t modificationdateLIBMTP_filetype_t filetypeLIBMTP_file_t * next
like, that's the entire roster. cute, right? π
π¦ Detailed Description π¦
it's the MTP file struct. that's the whole vibe. it's the thing that holds the deets about a file on your MTP device so the library can actually do stuff with it. periodt.
π Field Documentation π
okay now the fun part β every field, broken down, with receipts on where it shows up. lowkey this is the section you actually came for. π
π char* LIBMTP_file_struct::filename
Filename of this file β literally just what it's called. the name. of the file. π
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
Size of file in bytes β how thicc it is, in bytes. that's the unit, bestie, don't forget it π
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
Filetype used for the current file β like, what kind of file are we even dealing with here π₯
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
Unique item ID β the ID. it's unique. it's an item's. you get it π
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
Date of last alteration of the file β when it was last touched, changed, messed with. the timestamp of "bestie did something to me" π°οΈ
(no examples and no referencers listed for this one β it's giving mysterious. still iconic tho.)
β LIBMTP_file_t* LIBMTP_file_struct::next
Next file in list or NULL if last file β it's a linked list moment!! if this is NULL, congrats, you've reached the end π«Ά
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
ID of parent folder β who's your mother? this field knows. it's the folder this file lives inside π
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
ID of storage holding this file β which storage the file is chillin' on. the address of the house, basically π
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.
like, no human wrote this page, it was Doxygen doing its little robot thing. ngl that's kind of iconic of it π€
heads up bestie: this whole page is auto-generated by Doxygen straight from the libmtp source, so if something looks dry, blame the generator, not me π
and that's the vibe check, we're done!! ty for reading my whole ted talk about a struct. this was libmtp Version 1.1.23, and the page is LIBMTP_file_struct(3) β mwah, see you in the next manpage πβ¨π
π¦ where this page comes from
- arch rolling: libmtp 1.1.23-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms