Implemented By

Supported Methods

Description of Methods

Change(path as String) as Boolean

Modify or change the current path via the relative or absolute path passed as a string

Returns true if the resulting path is valid.

IsValid() as Boolean

Returns true if the current path is valid; that is, if the path is correctly formed.  This does not check whether the file actually exists.

Split() as Object

Returns an roAssociativeArray containing the following keys:

  • basename: (String) the filename, without parent directories or extension
  • extension: (String) the filename extension
  • filename: (String) the filename, with extension, without parent directories
  • parent: (String) the parent directory, or empty if in a root directory
  • phy: (String) the PHY volume

 

Example from Brightscript Debugger Interactive Shell
> mypath = CreateObject("roPath", "pkg:/source/appMain.brs")
> ? myPath.Split() 
parent: pkg:/source/
extension: .brs
phy: pkg:
basename: appMain
filename: appMain.brs
>