[英]Laravel 5.3 Is safe remove/delete storage folder from Laravel project?
I have a Laravel 5.3 project versioned, and files in this folder are constantly changing. 我有一个版本化的Laravel 5.3项目,此文件夹中的文件不断变化。
Is safe to remove from version control system? 从版本控制系统中删除是否安全?
If I delete that folder from my working copy, Laravel can keep working? 如果我从工作副本中删除该文件夹,Laravel可以继续工作吗?
You'll notice in a default Laravel 5.3 install there are 3 folders within storage
. 您会注意到在默认的Laravel 5.3安装中,
storage
有3个文件夹。 It looks like this: 它看起来像这样:
+ storage
+ app
+ framework
+ logs
And each of those subfolders has a .gitignore
as well as other folders (also usually with gitignores
. Those .gitignore
files generally say to ignore all files except for the .gitignore
. For example, this is the .gitignore
inside storage/logs
: 每个子文件夹都有一个
.gitignore
以及其他文件夹(通常还有gitignores
。这些.gitignore
文件通常会说要忽略除.gitignore
之外的所有文件。例如,这是storage/logs
的.gitignore
:
*
!.gitignore
That means that you can keep this in version control, but any file written to that folder (except for the .gitignore
file itself) will NOT be in your git repository. 这意味着您可以将其保留在版本控制中,但是写入该文件夹的任何文件(
.gitignore
文件本身除外)都不会出现在您的git存储库中。
Also, it might help to know that these folders have a specific purpose: 此外,知道这些文件夹具有特定目的可能会有所帮助:
app
: Designed to be used as storage for files outside of your root public folder app
:旨在用作根公用文件夹之外的文件的存储
framework
: By defaut, this is where Laravel writes a lot of its files for cache and views framework
:通过defaut,这是Laravel为缓存和视图编写大量文件的地方
logs
: Where the error logs are written logs
:写入错误日志的位置
If you delete the root storage
folder or these subfolders, the framework will have trouble finding these files and you'll get errors. 如果删除根
storage
文件夹或这些子文件夹,框架将无法找到这些文件,您将收到错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.