Directory.name readonly property



The Directory.name property returns a string representing the folder name (the last part of the fullpath).

Example

local dir = sys.Directory(sys.currentdir) -- outputs true print(dir.parent.name == sys.Directory(sys.currentdir.."\\..").name)