Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::IO::FileRange Class Reference

FileRange represents a subsection within a file. More...

#include <FileRange.h>

Public Member Functions

 FileRange (const FileRange &rhs)=default
 
FileRangeoperator= (const FileRange &rhs)=default
 
 FileRange (FileRange &&rhs)=default
 
FileRangeoperator= (FileRange &&rhs)=default
 
bool operator== (const FileRange &rhs) const
 
bool operator!= (const FileRange &rhs) const
 
bool IsEntireFile () const
 Whether or not the range covers the entire file.
 
bool IsSizeKnown () const
 
bool IsInRange (u64 offset) const
 Checks whether or not the given offset is within the file range.
 
u64 GetOffset () const
 
u64 GetSize () const
 
u64 GetEndPoint () const
 

Static Public Member Functions

static FileRange CreateRange (u64 offset, u64 size)
 Creates a file range for the subsection of the file.
 
static FileRange CreateRangeForEntireFile ()
 Creates a file range the represents the entire file.
 
static FileRange CreateRangeForEntireFile (u64 fileSize)
 Creates a file range the represents the entire file and includes the file size.
 

Detailed Description

FileRange represents a subsection within a file.

Member Function Documentation

◆ GetEndPoint()

u64 AZ::IO::FileRange::GetEndPoint ( ) const

Gets the offset in the file where this range ends. If this range represents the entire file this function will always return an arbitrarily large offset.

◆ GetOffset()

u64 AZ::IO::FileRange::GetOffset ( ) const

Gets the offset inside the target file where this range starts. If this range represents the entire file this function will always return 0.

◆ GetSize()

u64 AZ::IO::FileRange::GetSize ( ) const

Gets the size of the range. If this range represents the entire file this function will always return an arbitrarily large size.

◆ IsSizeKnown()

bool AZ::IO::FileRange::IsSizeKnown ( ) const

Whether or not this range has specified a known size. This is always true if the file contains a subsection, but is optionally filled in when the entire file is represented. If a size isn't specified GetSize() and GetEndPoint() can not be safely called.


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