PHP Classes

Algosling PHP Rename a File: Change a file name to have the given requirements

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-12-06 (5 months ago) RSS 2.0 feedNot enough user ratingsTotal: 40 All time: 10,857 This week: 455Up
Version License PHP version Categories
algoslingfileanew 1.0MIT/X Consortium ...5PHP 5, Files and Folders
Description 

Author

This package can change a file name to have the given requirements.

It can take the name of a file and a list of requirements that define the characteristics of the new file name.

The class returns a string with the new file name.

Currently, the class supports the following characteristics for the new file name:

- Have capital letters picked randomly

- Have numbers

- Have a unique identifier

- Have an hash of the file name

Picture of The Algoslingers
  Performance   Level  
Name: The Algoslingers is available for providing paid consulting. Contact The Algoslingers .
Classes: 5 packages by
Country: Ghana Ghana
Age: ???
All time rank: 40295 in Ghana Ghana
Week rank: 18 Up1 in Ghana Ghana Up
Innovation award
Innovation award
Nominee: 1x

Recommendations

Instructions

For installation:

  • Option 1: composer require thealgoslingers/algoslingfileanew

OR

  • Option 2: Download package and extract

Example

<?php
use Thealgoslingers\AlgoslingFileanew;
/*
## For file(s) being uploaded to server
## Please upload the file first
## Then use AlgoslingFileanew to rename it

------ HOW TO RENAME FILE AND/OR SAVE TO DIRECTORY ------
       $file = "path-to-your-file.extension";
       $AlgoslingFileanew = new AlgoslingFileanew;
       $newFile = $AlgoslingFileanew->renameFile($file,"Alnum");
       ## SAVE TO DIRECTORY (OPTIONAL) ##
       fopen("directory-path/$newFile","a");
*/
require "../vendor/autoload.php";

$AlgoslingFileanew = new AlgoslingFileanew();
$newFile = strtolower($AlgoslingFileanew->renameFile("textfile.txt","Alnum"));
echo
"Your new file is: $newFile";
?>


Details

Algoslingfileanew

Rename file in unique and pretty way


  Files folder image Files  
File Role Description
Files folder imagesrc (2 files)
Files folder imagetest (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file AlgoslingFileanew.php Class Class source
  Accessible without login Plain text file helpers.php Aux. Auxiliary script

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file testing.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:40
This week:0
All time:10,857
This week:455Up