RestLink 2.2.0
Powerfull Rest Client for Qt
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RestLink::File Class Reference

Helper class to manage a file intended for request body usage. More...

#include <body.h>

Public Member Functions

 File (const char *fileName)
 Constructs a File from a file path.
 
 File (const QString &fileName)
 Constructs a File from a file path.
 
 File (const File &other)=default
 
QFile * open () const
 Opens the file and returns a QFile pointer.
 

Detailed Description

Helper class to manage a file intended for request body usage.

The File class encapsulates a file path and provides an interface to open the file for reading, typically used in constructing a Body.

Constructor & Destructor Documentation

◆ File() [1/3]

RestLink::File::File ( const char *  fileName)
inline

Constructs a File from a file path.

Parameters
fileNameFile path.

◆ File() [2/3]

RestLink::File::File ( const QString &  fileName)
inline

Constructs a File from a file path.

Parameters
fileNameFile path.

◆ File() [3/3]

RestLink::File::File ( const File other)
default

Member Function Documentation

◆ open()

QFile * RestLink::File::open ( ) const

Opens the file and returns a QFile pointer.

Warning
The file is parented to app instance.