{"id":21726983,"url":"https://github.com/elementaryframework/firefs","last_synced_at":"2025-04-12T23:34:43.536Z","repository":{"id":47967215,"uuid":"130917645","full_name":"ElementaryFramework/FireFS","owner":"ElementaryFramework","description":"Easily manage your filesystem through PHP","archived":false,"fork":false,"pushed_at":"2023-04-20T19:31:30.000Z","size":71,"stargazers_count":17,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-15T21:42:30.643Z","etag":null,"topics":["composer","file-watcher","filesystem","fire","php7","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ElementaryFramework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=AGAQAC3W4ZRMA\u0026source=url"]}},"created_at":"2018-04-24T21:50:26.000Z","updated_at":"2024-02-07T23:28:38.000Z","dependencies_parsed_at":"2024-06-18T19:44:43.279Z","dependency_job_id":"dff1475d-96c6-4b0b-9270-1f72286ea4cd","html_url":"https://github.com/ElementaryFramework/FireFS","commit_stats":{"total_commits":50,"total_committers":3,"mean_commits":"16.666666666666668","dds":"0.040000000000000036","last_synced_commit":"747a0e08b9d2ef02010a339b72281533bb9e71fd"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementaryFramework%2FFireFS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementaryFramework%2FFireFS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementaryFramework%2FFireFS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElementaryFramework%2FFireFS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElementaryFramework","download_url":"https://codeload.github.com/ElementaryFramework/FireFS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226438817,"owners_count":17625107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","file-watcher","filesystem","fire","php7","php8"],"created_at":"2024-11-26T03:42:57.970Z","updated_at":"2024-11-26T03:42:58.718Z","avatar_url":"https://github.com/ElementaryFramework.png","language":"PHP","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=AGAQAC3W4ZRMA\u0026source=url"],"categories":[],"sub_categories":[],"readme":"\u003ccenter\u003e\n\n![FireFS Logo](assets/banner.png)\n\n\u003c/center\u003e\n\n# FireFS\n\n[![downloads](https://img.shields.io/packagist/dt/elementaryframework/fire-fs?style=for-the-badge\u0026logo=packagist)](https://packagist.org/packages/elementaryframework/fire-fs)\n[![downloads](https://img.shields.io/packagist/v/elementaryframework/fire-fs?style=for-the-badge\u0026logo=packagist)](https://packagist.org/packages/elementaryframework/fire-fs)\n[![downloads](https://img.shields.io/github/repo-size/ElementaryFramework/FireFS?style=for-the-badge\u0026logo=github)](https://github.com/ElementaryFramework/FireFS)\n[![downloads](https://img.shields.io/github/license/ElementaryFramework/FireFS?style=for-the-badge\u0026logo=github)](https://github.com/ElementaryFramework/FireFS/blob/master/LICENSE)\n\nManage your file system easily, through php\n\n**FireFS** is a library allowing you to write/read/delete files and folders of your file system, safely and easily.\n\nIt can be used for *web* applications as well for *console* applications, without any requirements.\n\n## Example\n\n```php\n\u003c?php\n\nuse ElementaryFramework\\FireFS\\FireFS;\n\n// Create a new file system instance at the given path\n$fs = new FireFS(\"./app\"); // /root/var/www/htdocs/app/\n\n// Check if the path \"/root/var/www/htdocs/app/images/\" exists\nif ($fs-\u003eexists(\"images\")) {\n    // Change the working directory to the images folder\n    $fs-\u003esetWorkingDirectory(\"./images\");\n\n    // Create a new file in the working directory\n    $fs-\u003emkfile(\"./logo.png\"); // /root/var/www/htdocs/app/images/logo.png\n\n    // Read file from the file system root path\n    $logo = $fs-\u003eread(\"logo.png\"); // /root/var/www/htdocs/app/logo.png\n\n    // Write into the created file\n    $fs-\u003ewrite(\"./logo.png\", $logo); // /root/var/www/htdocs/app/images/logo.png\n\n    // Delete the old file\n    $fs-\u003edelete(\"logo.png\"); // /root/var/www/htdocs/app/logo.png\n}\n\n// Change the working directory to the file system root path\n$fs-\u003esetWorkingDirectory(\"./\");\n\n// Create a \"blog\" directory\n$fs-\u003emkdir(\"blog\"); // /root/var/www/htdocs/app/blog/\n\n// Move \"images\" folder from \"app\" to \"app/blog\"\n$fs-\u003emove(\"images\", \"blog/images\");\n\n// And more !\n```\n\n## Features\n\n- Easy file system management ;\n- Object Oriented file system entities management, through [Folder](https://github.com/ElementaryFramework/FireFS/blob/master/src/FireFS/Entities/Folder.php) and [File](https://github.com/ElementaryFramework/FireFS/blob/master/src/FireFS/Entities/File.php) classes ;\n- Receive events of what happen to your file system (created, modified, deleted events) and execute a specific action with the [file system listener](https://github.com/ElementaryFramework/FireFS/blob/master/src/FireFS/Listener/IFileSystemListener.php) ;\n- Run a [file system watcher](https://github.com/ElementaryFramework/FireFS/blob/master/src/FireFS/Watcher/FileSystemWatcher.php) to watch for files changes in **real time** (recommended for console applications or long running PHP processes)\n\n## Installation\n\nYou can install **FireFS** in your project with [composer](http://getcomposer.org):\n\n```sh\ncomposer require elementaryframework/fire-fs\n```\n\nOnce installed, you can access the **FireFS** api through the `ElementaryFramework\\FireFS` namespace.\n\n## How to use\n\nNew to **FireFS** ? From console to web apps, you can read the [wiki](https://github.com/ElementaryFramework/FireFS/wiki) to know how to use this\nlibrary into your project.\n\n### Additional resources and tutorials\n\n- [How to create a file watcher with PHP and the Elementary Framework](https://dev.to/na2axl/how-to-create-a-file-watcher-with-php-and-the-elementary-framework-1po) written by @na2axl on dev.to\n\n## Donate\n\nLiking Elementary Framework? Help us continue to maintain it and provide you better support and awesome functionalities with a small donation!\n\n[![Donate PayPal Button](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=AGAQAC3W4ZRMA\u0026source=url)\n\n## License\n\n\u0026copy; 2018-2020 Aliens Group.\n\nLicensed under MIT ([read license](https://github.com/ElementaryFramework/FireFS/blob/master/LICENSE)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementaryframework%2Ffirefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementaryframework%2Ffirefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementaryframework%2Ffirefs/lists"}