-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix (CreteConfigurationFileCommand): Checks if the configuration file…
… already exists to prevent override
- Loading branch information
Showing
5 changed files
with
71 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Wtyd\GitHooks\Utils; | ||
|
||
use Illuminate\Support\Facades\Storage as FacadesStorage; | ||
|
||
class Storage | ||
{ | ||
/** @var string */ | ||
public static $disk = 'local'; | ||
/** | ||
* Determine if a file or directory exists. | ||
* | ||
* @param string $path | ||
* @return bool | ||
*/ | ||
public static function exists($path) | ||
{ | ||
return FacadesStorage::disk(self::$disk)->exists($path); | ||
} | ||
|
||
/** | ||
* Copy a file to a new location. | ||
* | ||
* @param string $path | ||
* @param string $target | ||
* @return bool | ||
*/ | ||
public static function copy($path, $target) | ||
{ | ||
return FacadesStorage::disk(self::$disk)->copy($path, $target); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters