LLVM 24.0.0git
file_t Struct Reference

This class wraps the platform specific file handle/descriptor type to provide an unified representation. More...

#include "llvm/Support/File.h"

Public Types

using value_type = int
 A file descriptor on UNIX.

Public Member Functions

 file_t ()
 Default constructor to invalid file.
 file_t (value_type Value)
 Implicit constructor from underlying value.
bool isValid () const
 Is a valid file.
value_type get () const
 Get the underlying value and return a platform specific value.

Public Attributes

value_type Value

Static Public Attributes

static constexpr value_type Invalid = -1
 Value for an invalid file descriptor.

Detailed Description

This class wraps the platform specific file handle/descriptor type to provide an unified representation.

Definition at line 21 of file File.h.

Member Typedef Documentation

◆ value_type

A file descriptor on UNIX.

Definition at line 29 of file File.h.

Constructor & Destructor Documentation

◆ file_t() [1/2]

llvm::sys::fs::file_t::file_t ( )
inline

Default constructor to invalid file.

Definition at line 36 of file File.h.

◆ file_t() [2/2]

llvm::sys::fs::file_t::file_t ( value_type Value)
inline

Implicit constructor from underlying value.

Definition at line 40 of file File.h.

Member Function Documentation

◆ get()

value_type llvm::sys::fs::file_t::get ( ) const
inline

Get the underlying value and return a platform specific value.

Definition at line 46 of file File.h.

◆ isValid()

bool llvm::sys::fs::file_t::isValid ( ) const
inline

Is a valid file.

Definition at line 43 of file File.h.

Member Data Documentation

◆ Invalid

value_type llvm::sys::fs::file_t::Invalid = -1
staticconstexpr

Value for an invalid file descriptor.

Definition at line 31 of file File.h.

◆ Value

value_type llvm::sys::fs::file_t::Value

Definition at line 33 of file File.h.


The documentation for this struct was generated from the following file: