Download the PHP package imran/file without Composer

On this page you can find all versions of the php package imran/file. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package file

File Handling

The File class is a PHP class that provides a convenient and easy-to-use API for working with files and directories in PHP. With this class, you can perform a wide range of file-related operations, such as reading and writing to files, creating and deleting directories, moving and copying files, and more.

All the methods in this class are static methods, meaning that you can use them without creating an instance of the class. This makes it easy to use the class from anywhere in your code.

Overall, the File class provides a powerful and user-friendly API for working with files and directories in PHP. Whether you're a beginner or an experienced PHP developer, this class is a valuable tool for simplifying file-related tasks and improving the reliability and performance of your code.

Features

Requirements

Installation

First, include the File.php class in your project.

or by using composer Recommended way

Methods

exists

The exists() method checks if a file or directory exists.

get

The get() method gets the contents of a file.

put

The put() method puts contents into a file.

append

The append() method appends contents to a file.

delete

The delete() method deletes a file.

isDirectory

The isDirectory() method checks if a path is a directory.

makeDirectory

The makeDirectory() method creates a directory.

deleteDirectory

The deleteDirectory() method deletes a directory.

readDirectory

The readDirectory() method reads the contents of a directory.

changeMode

The changeMode() method changes the mode of a file or directory.

prepend

The prepend() method prepends contents to a file.

move

The move() method moves a file to a new location.

link

The link() method creates a symbolic link to a target file.

name

The name() method gets the file name without extension.

basename

The basename() method gets the base name of a file.

dirname

The dirname() method gets the directory name of a file.

type

The type() method gets the type of file.

isReadable

The isReadable() method checks if a file is readable.

isWriteable

The isWriteable() method checks if a file is writeable.

isFile

The isFile() method checks if a path is a file.

files

The files() method gets all files in a directory.

allFiles

The allFiles() method gets all files in a directory and its subdirectories.

moveDirectory

The moveDirectory() method moves a directory to a new location.

copyDirectory

The copyDirectory() method copies a directory to a new location.

cleanDirectory

The cleanDirectory() method deletes all files in a directory.

size

The size() method returns the size of a file in bytes.

lastModified

The lastModified() method returns the last modification time of a file as a UNIX timestamp.

copy

The copy() method copies a file from one location to another.

move

The move() method moves a file from one location to another.

extension

The extension() method returns the extension of a file.

mimeType

The mimeType() method returns the MIME type of file.

Running Tests

To run tests, use following command

Hi, I'm Imran Ali! 👋

🚀 About Me

Senior Full-Stack Developer specializing in front end and back-end development. Experienced with all stages of the development cycle for dynamic web projects. Innovative, creative and a proven team player, I possess a Tech Degree in Front End Development and have 7 years building developing and managing websites, applications and programs for various companies. I seek to secure the position of Senior Full Stack Developer where i can share my skills, expertise and experience with valuable clients.

🛠 Skills

PHP OOP, Laravel, Codeigniter Javascript, Node, React, Vue, Git, HTML, Rest Api, Typescript, Angular, SCSS, Docker, CI/CD Jenkins, Bootstrap, Responsive Design, ASP.NET Core

🔗 Follow on

linkedin twitter

License

MIT License GPLv3 License AGPL License

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.


All versions of file with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-fileinfo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package imran/file contains the following files

Loading the files please wait ....