The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Name

SPVM::File::Spec::Instance - Object-Oriented File::Spec

Description

The File::Spec::Instance class of SPVM is an Object-Oriented File::Spec class.

Usage

  use File::Spec::Instance;

  my $spec = File::Spec::Instance->new;
  my $file = $spec->catfile(["foo", "bar"], "a.txt"]);

Class Methods

  static method new : File::Spec::Instance ();

Instance Methods

has_interfaces

  method has_interfaces : int ();

canonpath

  method canonpath : string ($path : string);

catdir

  method catdir : string ($directories : string[]);

catfile

  method catfile : string ($directories : string[], $filename : string);

curdir

  method curdir : string ();

devnull

  method devnull : string ();

rootdir

  method rootdir : string ();

tmpdir

  method tmpdir : string ();

updir

  method updir : string ();

no_upwards

  method no_upwards : string[] ($directories : string[]);

file_name_is_absolute

  method file_name_is_absolute : int ($path : string);

file_name_is_root

  method file_name_is_root : int ($path : string);

path

  method path : string[] ();

join

  method join : string ($directories : string[], $filename : string);

splitpath

  method splitpath : string[] ($path : string, $no_file : int = 0);

splitdir

  method splitdir : string[] ($path : string);

catpath

  method catpath : string ($volume : string, $directory : string, $file : string);

abs2rel

  method abs2rel : string ($path : string, $base : string = undef);

rel2abs

  method rel2abs : string ($path : string, $base : string = undef);

Well Known Child Classes

Repository

SPVM::File::Spec::Instance - Github

Author

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License