Giter VIP home page Giter VIP logo

php-files-manipulation-class's Introduction

PHP Files Class

This package can manipulate files and directories in several ways.

This package can manipulate files and directories in several ways.

It can perform several types of operations. Currently it can:

  1. Create directory
  2. Generate random string
  3. Change file permission
  4. Copy Files or folders
  5. Move files and folders
  6. Delete files and folders
  7. Upload files with validation
  8. Multiple file upload with validation
  9. read/write files

Requirement

  • PHP
  • Composer

install

run this command composer require lablnet/files

usage

<?php 

use Lablnet\Files;

require_once "../vendor/autoload.php";

$files = new Files();

//Write on file 
$files->open('test.txt','writeOnly')->write("I am test files");

// read the file
var_dump($files->open('test.txt','readOnly')->read('test.txt'));

//delete the file
$files->delete('test.txt');


//Make dir
$files->mkDir('name');

//Change premission
$files->permission('test.txt',0774);

//Delete files
$files->deleteFiles(['test.txt']);

//Copy files
$files->copyFiles('/name','dir/',['test.txt']);

//Move files
$files->moveFiles('/','dir/',['test.txt']);


//Delete dirs
$files->deleteDirs(['test.txt']);

//Copy dirs
$files->copyDirs('/','dir/',['test.txt']);

//Move dirs
$files->moveDirs('/','dir/',['test.txt']);

//File upload
$status = $files->fileUpload($_FILES['file'],'/','image');
var_dump($status);

//Multiple file upload
$status = $files->filesUpload($_FILES['file'],'/','image',count($_FILES['file']['name']));
var_dump($status);

php-files-manipulation-class's People

Contributors

jusdiffernt avatar nivaldoms avatar ossamamehmood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

php-files-manipulation-class's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.