---
name: "mtp_LIBMTP_file_struct"
section: "3"
platform: "linux"
package: "libmtp-doc"
version: "1.1.22-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mtp_LIBMTP_file_struct"
---

# mtp\_LIBMTP\_file\_struct(3)

## NAME

libmtp -

## 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**\

## Detailed Description

MTP file struct

**Examples** **delfile.c**, **detect.c**, **files.c**, **getfile.c**, **newfolder.c**, **sendfile.c**, **sendtr.c**, and **tracks.c**.

## Field Documentation

### char\* LIBMTP\_file\_struct::filename

Filename of this file

**Examples** **detect.c**, and **files.c**.

Referenced by **LIBMTP\_destroy\_file\_t()**, **LIBMTP\_new\_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

**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

**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

**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

### LIBMTP\_file\_t\* LIBMTP\_file\_struct::next

Next file in list or NULL if last file

**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

**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

**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.
