Garry's Mod Wiki

Revision Difference

string.GetPathFromFilename#512000

<function name="GetPathFromFilename" parent="string" type="libraryfunc">⤶ <description>Returns the path only from a file's path.</description>⤶ <realm>Shared and Menu</realm>⤶ <file line="142">lua/includes/extensions/string.lua</file>⤶ <args>⤶ <arg name="Inputstring" type="string">String to get path from.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="string">Path</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Demonstrates the use of string.GetPathFromFilename</description>⤶ <code>MsgN(string.GetPathFromFilename("garrysmod/lua/modules/string.lua"))</code>⤶ <output>"garrysmod/lua/modules/"</output>⤶ ⤶ </example>