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 - Portably Perform Operations on File Names

Description

SPVM::File::Spec is the SPVM's File::Spec class.

This module is designed to support operations commonly performed on file specifications

Usage

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

Class Methods

canonpath

  static method canonpath : string ($path : string);

catdir

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

catfile

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

curdir

  static method curdir : string ();

devnull

  static method devnull : string ();

rootdir

  static method rootdir : string ();

tmpdir

  static method tmpdir : string ();

updir

  static method updir : string ();

no_upwards

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

file_name_is_absolute

  static method file_name_is_absolute : int ($path : string);

file_name_is_root

  static method file_name_is_root : int ($path : string);

path

  static method path : string[] ();

join

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

splitpath

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

splitdir

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

catpath

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

abs2rel

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

rel2abs

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

Object Oriented Classes

The following classes are used to implement SPVM::File::Spec.

SPVM::Cwd

SPVM::Cwd is included in this distribution.

See Also

File::Spec

SPVM::File::Spec is Perl's File::Spec porting to SPVM.

Repository

SPVM::File::Spec - Github

Author

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright 2022-2022 Yuki Kimoto, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.