MCPcopy Create free account
hub / github.com/FastLED/FastLED / path_has_parent_segment

Function path_has_parent_segment

src/fl/asset/asset.h:73–75  ·  view source on GitHub ↗

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").

Source from the content-addressed store, hash-verified

71/// Does NOT reject single dots (".") or dots inside filename segments
72/// ("foo..bar", "file.ext", "hidden.dotfile").
73constexpr bool path_has_parent_segment(const char* p) FL_NOEXCEPT {
74 return (p == nullptr) ? false : path_has_parent_segment_at(p, 0);
75}
76
77} // namespace asset_detail
78

Callers 2

assetFunction · 0.85
FL_TEST_FILEFunction · 0.85

Calls 1

Tested by

no test coverage detected