BeardLib
  • Home
  • Things to Know
    • Adding Files
    • ScriptData
  • Modules
    • Achievements
    • Add Files
    • Adding your own modules
    • AssetUpdates (Mod Updates)
    • Classes
    • Contact (contractors)
    • Crime Spree Mission
    • DLC
    • Dependencies
    • Elements
    • Global Value (Tagging weapons/etc)
    • Heist Music
      • Stealth Music
    • Hooks
    • Interactions
    • Keybind
    • Level
    • Localization
    • Mask Material
    • Mask Pattern
    • Mask
    • Melee
    • Menu Music
    • Menu
    • ModuleBase
    • Narrative
    • Options
    • Package
    • Script Mods (Replace script data)
    • Sounds
    • Tweak Modify
    • Weapon Mod
    • Weapon Skin
    • Weapon
    • XML
  • API
    • BeardLib Class
    • Constants
    • File Manager
    • Frameworks
    • Hooks
    • ModCore
    • Package Manager
    • Special Hook IDs
  • Utilities
    • FileIO
    • Input
    • Main
    • Math
    • Menu Helper Plus
    • Path
    • String
    • Sync
    • Table
    • Tweak Data Helper
    • XML
    • YAML
  • MenuUI
    • ComboBox
    • ImageButton
    • Item
    • Items
    • Keybind
    • Menus
    • Slider
    • TextBox
    • Toggle
Powered by GitBook
On this page
  • Path
  • Functions

Was this helpful?

Edit on GitHub
  1. Utilities

Path

Updated for version 3.38

Path

An utility class for dealing with paths. Although in the past you'd call the class using BeardLib.Utils.Path (and still can), it was shortened because of its heavy use; so now you can call Path or path.

Functions

Get

Function
Return Type
Description

GetDirectory(String path)

String

Returns the directory of path which may be a file or a directory. Directory is being the folder that the file/folder resides in

GetFileName(String path)

String

Returns the file name from the provided path path

GetFileNameNoExt(String str)

String

Returns the file name (from the provided path) without the extension

Normalize(String str)

String

Returns a normalized version of the path str. Currently cleans the separators to all be '/'

Combine(String start, ...)

String

Returns a normalized and combined version of the passed paths. Starting with start and adding the passed ..., start cannot be null! Example: Path:Combine("path", "to", "file") returns "path/to/file"

CombineDir(String start, ...)

String

Like path but adds a forward slash in end of the result

PreviousMenu Helper PlusNextString

Last updated 3 years ago

Was this helpful?