FileRange represents a subsection within a file. More...
#include <FileRange.h>
Public Member Functions | |
| FileRange (const FileRange &rhs)=default | |
| FileRange & | operator= (const FileRange &rhs)=default |
| FileRange (FileRange &&rhs)=default | |
| FileRange & | operator= (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. | |
FileRange represents a subsection within a file.
| 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.
| 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.
| 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.
| 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.