FastLED 3.9.15
Loading...
Searching...
No Matches

◆ path_has_parent_segment()

bool fl::asset_detail::path_has_parent_segment ( const char * p)
constexpr

Compile-time check: returns true if the string contains a ".." segment.

Rejects all of the following:

  • "foo/../bar"
  • "../foo"
  • "foo/.."
  • ".." Does NOT reject single dots (".") or dots inside filename segments ("foo..bar", "file.ext", "hidden.dotfile").

Definition at line 73 of file asset.h.

73 {
74 return (p == nullptr) ? false : path_has_parent_segment_at(p, 0);
75}
constexpr bool path_has_parent_segment_at(const char *p, fl::size i) FL_NOEXCEPT
Recursive constexpr walk looking for any ".." segment.
Definition asset.h:58

References FL_NOEXCEPT, and path_has_parent_segment_at().

Referenced by fl::asset().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: