urbanjost / M_path

OOP interface to other GPF modules to manipulate and access files for use as a dependency with fpm (Fortran Package Manager)

Repository from Github https://github.comurbanjost/M_pathRepository from Github https://github.comurbanjost/M_path

M_path

Fortran OOP interface for a POSIX pathname

The M_path(3f) module creates an OOP (Object Oriented Programming) interface to other modules in the GPF (General Purpose Fortran) package found at

    git clone https://github.com/urbanjost/general-purpose-fortran

It allows the typical components of a pathname on a POSIX system (Such as GNU/Linux, Unix and Cygwin) to be accessed easily, to render the full pathname of the path and to get basic file properties (permissions, size, ownership, ...). The type defined is

       type path

             ! COMPONENTS:
             character(len=:),allocatable :: name
       contains

             ! METHODS:
             procedure    :: branch
             procedure    :: leaf
             procedure    :: stem
             procedure    :: bud
             procedure    :: init
             procedure    :: is_dir
             procedure    :: stat
             procedure    :: readable
             procedure    :: writable
             procedure    :: executable
             procedure    :: exists
             procedure    :: realpath

             ! OVERLOADED OPERATORS FOR TYPE(path)
             procedure,private :: eq
             generic           :: operator(==)  => eq
       end type path

It requires other modules from the package (Note that you can get and build the GPF package with just a Fortran compiler and make(1)). This repository is intended for allowing access to the module and its dependencies via the fpm (Fortran Package Manager). Specifically, the Fortran version (not the Haskell version).

docs

DOCUMENTATION

The man-page

DOWNLOAD

To create a copy for alteration using fpm use or download the github repository and build it with fpm ( as described at Fortran Package Manager ) use

    git clone https://github.com/urbanjost/M_path.git
     cd M_path
     fpm build
     fpm test
     fpm run -- .

but to use this as intended as a dependency in your fpm.toml project file just add the following into your fpm manifest file:

     [dependencies]
     M_path = { git = "https://github.com/urbanjost/M_path.git" }

About

OOP interface to other GPF modules to manipulate and access files for use as a dependency with fpm (Fortran Package Manager)

License:The Unlicense


Languages

Language:Fortran 100.0%