API Documentation
Loading...
Searching...
No Matches
File Class Reference

Logic for reading or writing to a file as well as navigating filesystems. More...

#include <File.h>

Inheritance diagram for File:
[legend]
Collaboration diagram for File:
[legend]

Public Types

enum  FilePart {
  e_drive = 0x01 , e_dir_path = 0x02 , e_file_name = 0x04 , e_file_extension = 0x08 ,
  e_full_path = e_drive | e_dir_path | e_file_name | e_file_extension , e_folder_name = 0x10
}
 
enum  OpenMode : uint01 {
  e_binary_read , e_binary_write , e_ascii_read , e_ascii_write ,
  e_ascii_read_safe , e_binary_read_safe , e_ascii_write_safe , e_binary_write_safe ,
  e_ascii_read_shared , e_undefined
}
 

Public Member Functions

Fileappend (const char &s)
 
Fileappend (const String &s)
 
FileappendPath (const String &cs)
 
bool cachedExist () const
 
void close ()
 
bool copyTo (const File &cs, bool override_file, ProgressInfo *log=nullptr) const
 
void create (bool override_file) const
 
const FileCachedDatacurrentCache () const
 
void deleteFile (ProgressInfo *log=nullptr)
 
bool exists () const
 
void expandEnvironmentalVars ()
 
 File ()
 
 File (const char *full_path)
 
 File (const File &file)
 
 File (const String &full_path)
 
 File (const String &resource_name, const String &path_id)
 
 File (File &&file) noexcept
 
 File (String &&full_path)
 
FILE * filePtr ()
 
uint08 fileSize () const
 
File findNonExistingSuitableName () const
 
void flush ()
 
File generateTempFile () const
 
Time getAccessTime () const
 
Buffer< File, uint04, ObjectAllocator< false > > getChildren () const
 
Buffer< File, uint04, ObjectAllocator< false > > getChildrenMatching (const Buffer< String > &include_patterns, const Buffer< String > &exclude_patterns, bool recursive=false) const
 
Time getCreationTime () const
 
Buffer< uint01getData ()
 
String getDriveDescription () const
 
void getFileTimes (Time &modified_time, Time &creation_time, Time &access_time) const
 
String getFolderName () const
 
Time getModifiedTime () const
 
File getParentDirectory () const
 
String getPath (uint01 file_parts) const
 
UUID getUUID () const
 
bool hasNullBytes (uint08 max_length=Constant< uint08 >::Max)
 
void invalidateCache ()
 
bool isDirectory () const
 
bool isDrive () const
 
bool isHidden () const
 
bool isMTP () const
 
bool isOpen () const
 
bool moveTo (File &file, bool override_file, ProgressInfo *log=nullptr, bool is_source_temp=false)
 
FILE * open (OpenMode mode, bool append=false)
 
size_t operator() () const
 
bool operator<< (const Buffer< uint01 > &values)
 
bool operator<< (const fltp04 &value)
 
bool operator<< (const fltp08 &value)
 
bool operator<< (const String &value)
 
Fileoperator= (const File &value)
 
Fileoperator= (File &&value) noexcept
 
Fileoperator= (String &value)
 
bool parentDirectoryExists () const
 
const StringpathID () const
 
String pathNameID () const
 
String relativePathTo (const File &reference) const
 
void removeInvalidChars ()
 
bool resolveMTPPath () const
 
bool resolveNameFromMTPPath ()
 
void setFromDisplayString (const String &display_string)
 
void setInternalVars ()
 
void setPath (const String &path, uint01 part)
 
void throwIfNotExist () const
 
String toDisplayString ()
 
bool updateAccessedTime () const
 
bool updateAccessedTime (Time access_time) const
 
void updateCache () const
 
void updateCache (const FileCachedData &cache)
 
 ~File ()
 
- Public Member Functions inherited from String
void addUTF16AsUTF8 (const wchar *unicode)
 Converts a unicode null terminated string of UTF16 wchars into UTF8 and appends it to the end of the String.
 
bool addUTF16CharAsUTF8 (const wchar *unicode, uint04 &advance)
 Converts a single unicode character at advance into UTF8 and appends it to the end of the String.
 
void addWChar (const wchar &object)
 Converts a single unicode character UTF16 character into one or more UTF8 characters and appends them to the end of this String.
 
StringaddWhiteSpace (uint04 desired_string_size, uint04 desired_right_alignment_location=0, char whitespace=' ')
 Used for formatting, will, if necessary, add white space so that the string becomes a certain length. desired_right_alignment_location Will try and align the string to a location by prepending whitspace. desired_string_size will append space to try and make the string a given size.
 
Stringappend (const String &string)
 Appends a string to the back of this string.
 
bool beginsWith (const String &s, bool ignore_case=false) const
 Tests if this String starts with the specified prefix.
 
const char * c_str () const
 Used to access the raw memory of this string.
 
bool endsWith (const String &s, bool ignore_case=false) const
 Tests if this String ends with the specified suffix.
 
StringformatAsTitleString ()
 Formats the string to be a title, capitalizing important characters and replacing underscores with spaces.
 
StringformatNumberString (bool add_comma, uint04 decimals)
 For a string representing a number, makes the decimals equal to the the provided value and adds comma seperators if number is large enough.
 
StringformatNumberString (bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal='.', char comma=',')
 Modifies the contents of this string, that represents a given number using the provided rules.
 
StringformatNumberString (uint04 decimals)
 For a string representing a number, makes the decimals equal to the the provided value Example: String("1000000").formatNumberString(2); will make "1000000.00".
 
uint04 fromHex () const
 Converts a hex value into an unsigned 4 byte number.
 
template<class t_type >
t_type getAs () const
 Converts a string into an object. To use this function an object must have overwritten StringStream<t_type>::fromString.
 
uint08 hash () const
 Creates a simple, quick hash of the object. See hash(const char* value) for details of the implementation.
 
uint08 hashLower () const
 Creates a simple, quick hash of the object. See hash(const char* value) for details of the implementation.
 
uint08 hashUpper () const
 Creates a simple, quick hash of the object. See hash(const char* value) for details of the implementation.
 
bool hasSubString (const char *sub_string, bool ignore_case=false) const
 Tests if this String contains the specified substring.
 
bool hasSubString (const String &sub_string, bool ignore_case=false) const
 Tests if this String contains the specified substring.
 
uint04 indexOf (const char &sub_string) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
uint04 indexOf (const char &sub_string, uint04 start_pos) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
uint04 indexOf (const char &sub_string, uint04 start_pos, uint04 size) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
uint04 indexOf (const char *sub_string, bool ignore_case, uint04 start_index, uint04 size) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
uint04 indexOf (const char *sub_string, bool ignore_case=false, uint04 start_index=0) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
uint04 indexOf (const char *sub_string, char escape_char, bool ignore_case=false, uint04 start_index=0) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
uint04 indexOf (const String &sub_string, bool ignore_case=false, uint04 start_index=0) const
 Given a substring specified by the input, returns the first index of that string, if it exists.
 
String insertNewLines (uint04 max_line_size) const
 Finds key areas to insert new lines such that the rows are at most, the length provided.
 
bool isNumeric () const
 Checks to see if the string is a numeric string.
 
bool isSameNoCase (const String &s) const
 Checks whether two strings match in a case-insensitive way.
 
uint04 lastIndexOf (const char *sub_string, bool ignore_case=false) const
 Given a substring specified by the input, returns the last index of that string, if it exists.
 
uint04 lastIndexOf (const char value, bool ignore_case=false) const
 Given a value specified by the input, returns the last index of that char, if it exists.
 
bool matchesWildcard (const String &pattern) const
 Checks whether two strings match allowing '' to be used as a wildcard pattern. For example, String("Hello").matchesWildcard("*ll") would return true.
 
 operator uint04 () const
 
 operator uint08 () const
 
bool operator!= (const char *const value) const
 
template<std::size_t t_size>
bool operator!= (const char(&string)[t_size])
 
bool operator!= (const String &value) const
 
size_t operator() () const
 
bool operator< (const String &value) const
 
Stringoperator= (const String &value)
 
Stringoperator= (String &&value) noexcept
 
bool operator== (const char *const value) const
 
template<std::size_t t_size>
bool operator== (const char(&string)[t_size])
 
bool operator== (const String &value) const
 
bool operator> (const String &value) const
 
String predictNextStringIncrement () const
 Looks in the string for key markers that might be an index, and attempts to increment the index. If no index is found a "1" will be inserted to the end of the string.
 
StringremoveNonAlphaNumeric (bool remove_tab=true, bool remove_space=true, bool remove_new_line=true, bool remove_r=true, bool remove_numbers=false)
 Removes any characters that aren't numbers or letters with other options available.
 
StringremoveNonNumeric ()
 Removes anything that is not a number or decimal ('0'-'9' or .)
 
Stringreplace (const Buffer< String, uint04, ObjectAllocator< false > > &sub_string, const Buffer< String, uint04, ObjectAllocator< false > > &replace_sub_string, bool ignore_case=false)
 Replaces ALL instances of the given substrings with the provided replacements. This allows safe replacement when the replacement string might contain the same data being replaced.
 
Stringreplace (const String &sub_string, const String &replace_sub_string, bool ignore_case=false)
 Replaces ALL instances of a given substring with the provided replacement.
 
String shortenString (uint04 size) const
 Shortans the string to the max size provided. If string is longer, searches for an ideal place to insert "...".
 
Buffer< String, uint04, ObjectAllocator< false > > splitString (char delimiter, bool preserve_empty=true) const
 Given a delimiter, breaks the string into subsections, returning an array of each subsection. If the String is empty, an empty String will be appended to the output if preserve_empty is true.
 
void splitString (char delimiter, Buffer< String, uint04, ObjectAllocator< false > > &strings, bool preserve_empty=true) const
 Given multiple delimiter, breaks the string into subsections, and APPENDS each substring to the given Buffer. If the String is empty, an empty Buffer will be appended if preserve_empty is true.
 
Buffer< String, uint04, ObjectAllocator< false > > splitString (const Buffer< char > &delimiter, bool preserve_empty=true) const
 Given multiple delimiter, breaks the string into subsections, returning an array of each subsection. If the String is empty, an empty String will be appended to the output if preserve_empty is true. For example, String("The quick, dog,,jumped").splitString({',', ' '}, true) would return {"The", "quick", "dog", "", "jumped"}.
 
void splitString (const Buffer< char > &delimiter, Buffer< String, uint04, ObjectAllocator< false > > &strings, bool preserve_empty=true) const
 Given multiple delimiter, breaks the string into subsections, and APPENDS each substring to the given Buffer. If the String is empty, an empty String will be appended if preserve_empty is true.
 
 String ()
 Constructor used to create an empty String*.
 
 String (const char *const string, uint04 size)
 String Constructor char arrays when the size is known. Slightly faster than iterating over a null-terminated array.
 
 String (const char *string)
 String Constructor for null terminated array of chars.
 
template<std::size_t N>
 String (const char(&string)[N])
 String Constructor for static char arrays.
 
 String (const String &string)
 Copy Constructor.
 
template<class t_type >
 String (const t_type &value)
 String Constructor that creates a string based off an object. To use this function an object must have overwritten StringStream<t_type>::toString.
 
template<std::size_t N>
 String (const wchar(&string)[N])
 String Constructor for static wchar arrays of UTF16 data.
 
 String (String &&string) noexcept
 Move contructor (No new memory allocation).
 
 String (uint04 size, const char &value)
 String Constructor creates a string of a size and fills it with a character.
 
String substr (uint04 start) const
 Creates a substring from a given start position, to the end of the string.
 
String substr (uint04 start, uint04 end) const
 Creates a substring from a given start position, to the given end position, non-inclusive of the end index. If the end index is greater than the size of the string, all data past start is returned.
 
String toLower () const
 changes all upper case characters into lower case characters.
 
String toUpper () const
 changes all lower case characters into upper case characters.
 
StringtrimWhiteSpace ()
 Trims any white space (tabs, spaces, etc) from the beginning and end of the string.
 
- Public Member Functions inherited from Buffer< char, uint04, ObjectAllocator< true >, BufferAllocator< char, uint04, true > >
void add (char &&object)
 Adds object to the end of the buffer.
 
void add (const char &object)
 Adds object to the end of the buffer.
 
void add (uint04 location, char &&object)
 Adds an object to a specific location. Equivelent to insert.
 
void add (uint04 location, const char &object)
 Adds and object to a specific location. Equivelent to insert.
 
void addAll (const Buffer< char, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > &buffer)
 
void addAll (const char *buffer)
 
void addAll (const char *buffer, uint04 buffer_size)
 
void addAndFillSpace (uint04 space_to_add, const char &fill_object)
 
void addSpace (uint04 location, uint04 size)
 
void addSpace (uint04 space_to_add)
 Adds a space to the end of the buffer.
 
decltype(auto) begin ()
 
decltype(auto) begin () const
 
decltype(auto) begin (uint04 index) const
 
constexpr Buffer ()
 
constexpr Buffer (Buffer &&buffer) noexcept
 
constexpr Buffer (const Buffer &buffer)
 
 Buffer (const char *buffer, uint04 size)
 
 Buffer (const t_iterator &begin, const t_iterator &end)
 
 Buffer (std::initializer_list< char > l)
 
 Buffer (uint04 size)
 
 Buffer (uint04 size, const char &fill_object)
 
uint04 capacity () const
 
void clear ()
 
void clear (uint04 new_capacity)
 
sint04 compare (const Buffer &value) const
 Compares this Buffer to another to determine their relative ordering.
 
sint04 compare (const Buffer &value, uint04 start, uint04 end) const
 
bool contains (const char &element) const
 
bool contains (const char &element, const std::function< bool(const char &, const char &)> &equal_function) const
 
bool contains (const char &element, uint04 start) const
 
bool contains (const char &element, uint04 start, uint04 search_size) const
 
uint04 count (const char &element) const
 
decltype(auto) end ()
 
decltype(auto) end () const
 
decltype(auto) end (uint04 index)
 
void ensureCapacity (uint04 new_capacity, bool ensure_not_greater=false, bool ensure_not_less=true)
 
bool equals (const Buffer &buffer) const
 
decltype(auto) get (uint04 index)
 
decltype(auto) get (uint04 index) const
 
Buffer getAll (uint04 start, uint04 size)
 
Buffer< t_other_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > getAs () const
 Gets a copy of this buffer, with filled objects t_other_type, where all objects are created using the contents of this buffer.
 
uint04 indexOf (const char &element) const
 
uint04 indexOf (const char &element, uint04 start_pos) const
 
uint04 indexOf (const char &element, uint04 start_pos, uint04 search_size) const
 
void insert (const uint04 location, const char *buffer)
 Inserts data into the buffer, assumed to be null terminated.
 
void insert (uint04 location, char &&object)
 Adds an object to a specific location.
 
void insert (uint04 location, const char &object)
 Adds an object to a specific location.
 
void insert (uint04 offset, const Buffer &buffer)
 
void insert (uint04 offset, const char *const buffer, uint04 buffer_size)
 Inserts data into the buffer.
 
bool isEmpty () const
 
bool isSorted () const
 
bool isSortedSet () const
 
decltype(auto) last ()
 
decltype(auto) last () const
 
uint04 lastIndexOf (const char &element) const
 
constexpr BufferAllocator< char, uint04, true > & memoryInterface ()
 
constexpr const BufferAllocator< char, uint04, true > & memoryInterface () const
 
uint04 memSize () const
 
void move (uint04 from, uint04 to)
 
 operator char * ()
 Gets the first location of type* in the array.
 
 operator const char * () const
 Gets the first location of type* in the array.
 
bool operator!= (const Buffer &buffer) const
 
Buffer operator+ (const Buffer &value) const
 
Buffer operator+ (const char &element) const
 
Bufferoperator+= (const Buffer &value)
 
const Bufferoperator+= (const char &element)
 
bool operator< (const Buffer &buffer) const
 
bool operator<= (const Buffer &buffer) const
 
Bufferoperator= (Buffer &&buffer) noexcept
 
Bufferoperator= (const Buffer &buffer)
 
bool operator== (const Buffer &buffer) const
 
bool operator> (const Buffer &buffer) const
 
bool operator>= (const Buffer &buffer) const
 
decltype(auto) operator[] (const int index)
 
decltype(auto) operator[] (const int index) const
 
decltype(auto) operator[] (const uint04 index)
 
decltype(auto) operator[] (const uint04 value) const
 
void primitiveSort ()
 
decltype(auto) ptr ()
 
decltype(auto) ptr () const
 
void removeAllIndex (uint04 start, uint04 end)
 
void removeAllIndices (const t_range_buffer &ranges)
 
void removeAllOrdered (const char &object)
 Removes all instances of the object. Function is slower than removeAllUnordered but order is preserved.
 
void removeAllOrderedFn (const t_functor &functor)
 Removes all items based on the functor. The functor should return true if the item is deleted or false if the item should stay in the array. Function is slower than removeAllUnordered but order is preserved.
 
void removeAllUnordered (const char &object)
 Removes all unordered described by object. This function does not preserve the order of the buffer.
 
void removeAllUnordered (const t_functor &functor)
 Removes all items based on the functor. The functor should return true if the item is deleted or false if the item should stay in the array. Faster function then removeAllOrdered but order is not preserved.
 
bool removeElement (const char &element)
 
void removeIndex (uint04 location)
 
void removeIndexBackSwap (uint04 location)
 
void removeLast ()
 
void replaceAll (const char &var, const char &replacement)
 
void replaceIndexRange (uint04 offset, uint04 replace_size, const Buffer &buffer)
 
void resize (uint04 new_size)
 
void reverse ()
 
void reverse (const uint04 start, const uint04 end)
 
void setAll (const Buffer &buffer, uint04 offset, uint04 other_offset, uint04 size)
 
void setAll (const Buffer &buffer, uint04 offset, uint04 size)
 
void setAll (const t_o_type *src, uint04 offset, uint04 size)
 
void setAllToValue (const t_o_type &fill_element, const uint04 offset=0, uint04 fill_size=Constant< uint04 >::Invalid)
 
void setSize (const uint04 new_size, const char &fill_element)
 
void setSize (uint04 new_size)
 
void setUnique ()
 
void setUniquePresorted ()
 
constexpr uint04 size () const
 
void sort ()
 
uint04 sortAboutValue (uint04 value_index)
 
uint04 sortAboutValue (uint04 value_index, uint04 start, uint04 end)
 
void sortRange (uint04 start, uint04 end)
 
void swapAllElements (const char &element1, const char &element2)
 
void swapElements (const char &element1, const char &element2)
 
void swapIndices (uint04 index_1, uint04 index_2)
 
 ~Buffer ()
 

Static Public Member Functions

static bool accessSort (const File &i, const File &j)
 
static bool createSort (const File &i, const File &j)
 
static bool doesFileExist (const String &name)
 
static bool isIDSep (const char &path)
 
static bool isPathSep (const char &path)
 
static Buffer< File, uint04, ObjectAllocator< false > > MTPDevices ()
 
static bool nameSort (const File &i, const File &j)
 
static Buffer< File, uint04, ObjectAllocator< false > > SystemDrives ()
 
static File TempFileFolder ()
 
static bool typeSort (const File &i, const File &j)
 
- Static Public Member Functions inherited from String
static bool AlphaNumericCompare (const String &left, const String &right)
 Compares two strings given their alpha-numeric determined value.
 
static String ConvertToCharString (uint04 number)
 Converts a number into a char string. For example 0 will become 'A' and 27 will become 'AA'.
 
template<class t_type >
static TranslatedString DisplayString (const t_type &value)
 Converts an object into a TranslatedString. To use this function an object must have overwritten StringStream<t_type>::toDisplayString.
 
static constexpr uint08 hash (const char *value)
 constexpr method to hash a value. Also provides the hashing method used throughout the API to hash strings.
 
static bool IsWhiteSpace (char s)
 Checks whether a given character is a whitespace character or not.
 
static String NumberString (fltp08 value, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal='.', char comma=',')
 Creates a string from a given number using the provided rules.
 
static constexpr uint04 str_len (const char *value)
 constexpr method to get the length of a null-terminated string at compile time
 
static constexpr uint04 str_len (const wchar *value)
 constexpr method to get the UTF8 length of a null-terminated string at compile time
 
static String ToHex (char value)
 Converts the memory of the given object into a hexidecimal string.
 
template<class t_object , class t_allocator , class t_buff >
static String ToHex (const Buffer< t_object, t_allocator, t_buff > &values)
 Converts a buffer of objects into a hexidecimal string.
 
static String ToHex (const String &values)
 Converts a string of any type of data (assumed to be binary) into a hex representation.
 
template<uint01 t_size, class t_type >
static String ToHex (const Vector< t_size, t_type > &values)
 Converts a vector into a hex representation.
 
template<class t_object >
static std::enable_if< ObjectInfo< t_object >::Integer, String >::type ToHex (t_object value)
 Converts the memory of the given object into a hexidecimal string.
 
static String ToHex (uint01 value)
 Converts the memory of the given object into a hexidecimal string.
 
static String UTF16toUTF8 (const wchar *unicode, uint04 &advance)
 
static wchar UTF8toUTF16 (const char *utf8, uint04 &advance)
 Converts a unicode null terminated string of chars into a UTF16 wchar and increments advance by the ammount of characters consumed to make the UTF16 character.
 
- Static Public Member Functions inherited from Buffer< char, uint04, ObjectAllocator< true >, BufferAllocator< char, uint04, true > >
static constexpr char Type ()
 

Static Public Attributes

static constexpr char DriveSep = ':'
 
static constexpr char ExtSep = '.'
 
static constexpr char IDSep = '|'
 
static constexpr char PathSep = '\\'
 
static String PathSepS
 

Protected Attributes

FileCachedData m_cached_data
 
uint01 m_file_ext_start
 
uint01 m_file_name_start
 
FILE * m_file_ptr
 
String m_id
 
bool m_id_valid
 
OpenMode m_open_mode
 
uint01 m_path_start
 

Detailed Description

Logic for reading or writing to a file as well as navigating filesystems.


or other common file operations.

Member Enumeration Documentation

◆ FilePart

enum FilePart
Enumerator
e_drive 
e_dir_path 
e_file_name 
e_file_extension 
e_full_path 
e_folder_name 

◆ OpenMode

enum OpenMode : uint01
Enumerator
e_binary_read 
e_binary_write 
e_ascii_read 
e_ascii_write 
e_ascii_read_safe 
e_binary_read_safe 
e_ascii_write_safe 
e_binary_write_safe 
e_ascii_read_shared 
e_undefined 

Constructor & Destructor Documentation

◆ File() [1/7]

File ( )

◆ File() [2/7]

File ( const File & file)

◆ File() [3/7]

File ( const String & resource_name,
const String & path_id )

◆ File() [4/7]

File ( File && file)
noexcept

◆ File() [5/7]

File ( const String & full_path)

◆ File() [6/7]

File ( String && full_path)

◆ File() [7/7]

File ( const char * full_path)

◆ ~File()

~File ( )

Member Function Documentation

◆ accessSort()

static bool accessSort ( const File & i,
const File & j )
static

◆ append() [1/2]

File & append ( const char & s)

◆ append() [2/2]

File & append ( const String & s)

◆ appendPath()

File & appendPath ( const String & cs)

◆ cachedExist()

bool cachedExist ( ) const
nodiscard

◆ close()

void close ( )

◆ copyTo()

bool copyTo ( const File & cs,
bool override_file,
ProgressInfo * log = nullptr ) const

◆ create()

void create ( bool override_file) const

◆ createSort()

static bool createSort ( const File & i,
const File & j )
static

◆ currentCache()

const FileCachedData & currentCache ( ) const

◆ deleteFile()

void deleteFile ( ProgressInfo * log = nullptr)

◆ doesFileExist()

static bool doesFileExist ( const String & name)
static

◆ exists()

bool exists ( ) const
nodiscard

◆ expandEnvironmentalVars()

void expandEnvironmentalVars ( )

◆ filePtr()

FILE * filePtr ( )
nodiscard

◆ fileSize()

uint08 fileSize ( ) const
nodiscard

◆ findNonExistingSuitableName()

File findNonExistingSuitableName ( ) const

◆ flush()

void flush ( )

◆ generateTempFile()

File generateTempFile ( ) const
nodiscard

◆ getAccessTime()

Time getAccessTime ( ) const
nodiscard

◆ getChildren()

Buffer< File, uint04, ObjectAllocator< false > > getChildren ( ) const
nodiscard

◆ getChildrenMatching()

Buffer< File, uint04, ObjectAllocator< false > > getChildrenMatching ( const Buffer< String > & include_patterns,
const Buffer< String > & exclude_patterns,
bool recursive = false ) const
nodiscard

◆ getCreationTime()

Time getCreationTime ( ) const
nodiscard

◆ getData()

Buffer< uint01 > getData ( )
nodiscard

◆ getDriveDescription()

String getDriveDescription ( ) const
nodiscard

◆ getFileTimes()

void getFileTimes ( Time & modified_time,
Time & creation_time,
Time & access_time ) const

◆ getFolderName()

String getFolderName ( ) const
nodiscard

◆ getModifiedTime()

Time getModifiedTime ( ) const
nodiscard

◆ getParentDirectory()

File getParentDirectory ( ) const

◆ getPath()

String getPath ( uint01 file_parts) const
nodiscard

◆ getUUID()

UUID getUUID ( ) const
nodiscard

◆ hasNullBytes()

bool hasNullBytes ( uint08 max_length = Constantuint08 >::Max)

◆ invalidateCache()

void invalidateCache ( )

◆ isDirectory()

bool isDirectory ( ) const
nodiscard

◆ isDrive()

bool isDrive ( ) const
nodiscard

◆ isHidden()

bool isHidden ( ) const
nodiscard

◆ isIDSep()

static bool isIDSep ( const char & path)
static

◆ isMTP()

bool isMTP ( ) const

◆ isOpen()

bool isOpen ( ) const
nodiscard

◆ isPathSep()

static bool isPathSep ( const char & path)
static

◆ moveTo()

bool moveTo ( File & file,
bool override_file,
ProgressInfo * log = nullptr,
bool is_source_temp = false )

◆ MTPDevices()

static Buffer< File, uint04, ObjectAllocator< false > > MTPDevices ( )
static

◆ nameSort()

static bool nameSort ( const File & i,
const File & j )
static

◆ open()

FILE * open ( OpenMode mode,
bool append = false )

◆ operator()()

size_t operator() ( ) const
inline

◆ operator<<() [1/4]

bool operator<< ( const Buffer< uint01 > & values)

◆ operator<<() [2/4]

bool operator<< ( const fltp04 & value)

◆ operator<<() [3/4]

bool operator<< ( const fltp08 & value)

◆ operator<<() [4/4]

bool operator<< ( const String & value)

◆ operator=() [1/3]

File & operator= ( const File & value)

◆ operator=() [2/3]

File & operator= ( File && value)
noexcept

◆ operator=() [3/3]

File & operator= ( String & value)

◆ parentDirectoryExists()

bool parentDirectoryExists ( ) const
nodiscard

◆ pathID()

const String & pathID ( ) const
inline

◆ pathNameID()

String pathNameID ( ) const

◆ relativePathTo()

String relativePathTo ( const File & reference) const

◆ removeInvalidChars()

void removeInvalidChars ( )

◆ resolveMTPPath()

bool resolveMTPPath ( ) const

◆ resolveNameFromMTPPath()

bool resolveNameFromMTPPath ( )

◆ setFromDisplayString()

void setFromDisplayString ( const String & display_string)

◆ setInternalVars()

void setInternalVars ( )

◆ setPath()

void setPath ( const String & path,
uint01 part )

◆ SystemDrives()

static Buffer< File, uint04, ObjectAllocator< false > > SystemDrives ( )
static

◆ TempFileFolder()

static File TempFileFolder ( )
staticnodiscard

◆ throwIfNotExist()

void throwIfNotExist ( ) const

◆ toDisplayString()

String toDisplayString ( )

◆ typeSort()

static bool typeSort ( const File & i,
const File & j )
static

◆ updateAccessedTime() [1/2]

bool updateAccessedTime ( ) const

◆ updateAccessedTime() [2/2]

bool updateAccessedTime ( Time access_time) const

◆ updateCache() [1/2]

void updateCache ( ) const

◆ updateCache() [2/2]

void updateCache ( const FileCachedData & cache)

Member Data Documentation

◆ DriveSep

char DriveSep = ':'
staticconstexpr

◆ ExtSep

char ExtSep = '.'
staticconstexpr

◆ IDSep

char IDSep = '|'
staticconstexpr

◆ m_cached_data

FileCachedData m_cached_data
mutableprotected

◆ m_file_ext_start

uint01 m_file_ext_start
protected

◆ m_file_name_start

uint01 m_file_name_start
protected

◆ m_file_ptr

FILE* m_file_ptr
protected

◆ m_id

String m_id
mutableprotected

◆ m_id_valid

bool m_id_valid
mutableprotected

◆ m_open_mode

OpenMode m_open_mode
protected

◆ m_path_start

uint01 m_path_start
protected

◆ PathSep

char PathSep = '\\'
staticconstexpr

◆ PathSepS

String PathSepS
static

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