Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 2, 2024 via composer

spatie/temporary-directory 2.2.0

Easily create, use and destroy temporary directories
Package summary
Share
0
issues
1
license
1
MIT
Package created
31 Jan 2017
Version published
25 Sep 2023
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
spatie/temporary-directory@2.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of spatie/temporary-directory 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does spatie/temporary-directory do?

The Spatie's Temporary Directory, aka spatie/temporary-directory, is a PHP package designed to efficiently create, utilize, and delete temporary directories. The package allows developers to rapidly create a temporary directory within the system's temporary directory, perform required actions, and then seamlessly delete the directory and all contended files.

How do you use spatie/temporary-directory?

The Spatie Temporary Directory package is quite straightforward to use. First, install the package with Composer using the command composer require spatie/temporary-directory. Here are a few usage examples:

Creating a temporary directory:

use Spatie\TemporaryDirectory\TemporaryDirectory;
$temporaryDirectory = (new TemporaryDirectory())->create();

Customizing the directory name:

$temporaryDirectory = (new TemporaryDirectory())->name($name)->create();

Forcefully create a directory, even if a directory with the same name exists:

$temporaryDirectory = (new TemporaryDirectory())->name($name)->force()->create();

Create a directory at a custom location:

$temporaryDirectory = (new TemporaryDirectory($location))->create();

or

$temporaryDirectory = (new TemporaryDirectory())->location($location)->create();

Determine paths within the temporary directory:

$temporaryDirectory = (new TemporaryDirectory())->create();
$temporaryPath = $temporaryDirectory->path('dumps/datadump.dat'); 

Clear all files in a temporary directory:

$temporaryDirectory->empty();

Deleting the entire temporary directory:

$temporaryDirectory->delete();

Where are the spatie/temporary-directory docs?

The documentation detailing the detailed usage and methods of the Spatie Temporary Directory package is present in the README file on the package's GitHub repository. For additional details like security vulnerabilities, changes made in recent versions, and contribution guidelines, you can refer to the respective sections in the README or navigate to the respective linked pages.