MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetExtension

Method GetExtension

Source/Engine/Platform/Base/FileSystemBase.cpp:113–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113String FileSystemBase::GetExtension(const StringView& path)
114{
115 Char chr;
116 int32 length = path.Length();
117 int32 num = length;
118 do
119 {
120 num--;
121 if (num < 0)
122 {
123 break;
124 }
125 chr = path[num];
126 if (chr != '.')
127 {
128 continue;
129 }
130 if (num == length - 1)
131 {
132 return String::Empty;
133 }
134 num++;
135 return path.Substring(num, length - num);
136 } while (chr != TEXT('\\') && chr != TEXT('/') && chr != TEXT(':'));
137
138 return String::Empty;
139}
140
141void FileSystemBase::GetTempFilePath(String& tmpPath)
142{

Callers 15

ImportMethod · 0.80
IsValidAssetNameMethod · 0.80
FastTempAssetCloneMethod · 0.80
MoveMethod · 0.80
CopyMethod · 0.80
LoadAssetsMethod · 0.80
ModifyResultFilenameMethod · 0.80
CreateEntryMethod · 0.80
TextureImportEntryMethod · 0.80
RenameMethod · 0.80
GetClonedAssetPathMethod · 0.80

Calls 2

SubstringMethod · 0.80
LengthMethod · 0.45

Tested by

no test coverage detected