In IO::Path§

See primary documentation in context for method SPEC

method SPEC(IO::Path:D: --> IO::Spec)

Returns the IO::Spec object that was (implicitly) specified at object creation time.

my $io = IO::Path.new("/bin/bash");
say $io.SPEC;                            # OUTPUT: «(Unix)␤» 
say $io.SPEC.dir-sep;                    # OUTPUT: «/␤»