herrera-io/file-system-functions

此包已被弃用,不再维护。未建议替代包。

一组与文件系统相关的函数。

2.0.0 2013-07-20 16:20 UTC

This package is not auto-updated.

Last update: 2021-12-07 01:34:19 UTC


README

Build Status

我将弃用此包,转而使用 phine/lib-path

一组与文件系统相关的函数。

摘要

该库包含一组简单的与文件系统相关的函数

  • canonical_path() - 返回规范化的文件路径。
  • is_absolute_path() - 检查是否为绝对路径。
  • is_hidden_path() - 检查是否为隐藏路径。

安装

将其添加到您的Composer依赖列表中

$ composer require herrera-io/file-system-functions=1.*

用法

<?php

var_export(canonical_path('../../myDir')); // /var/lib/myDir
var_export(canonical_path('../../myDir')); // C:\\Projects\\myDir

var_export(is_absolute_path('../')); // false
var_export(is_absolute_path('C:\\Test\\Path')); // true

var_export(is_hidden_path('/path/to/.hidden')); // true
var_export(is_hidden_path('C:\\Path\\To\\Hidden.txt')); // true