{"id":18570092,"url":"https://github.com/vdechenaux/iso-9660","last_synced_at":"2025-04-10T06:32:29.549Z","repository":{"id":62543865,"uuid":"139616557","full_name":"vdechenaux/iso-9660","owner":"vdechenaux","description":"PHP Stream Wrapper for ISO9660 files (.iso files)","archived":false,"fork":false,"pushed_at":"2023-05-01T08:23:08.000Z","size":41,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T17:01:46.198Z","etag":null,"topics":["cdrom","iso","iso9660","joliet","php","rockridge","stream-wrapper"],"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/vdechenaux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-07-03T17:27:24.000Z","updated_at":"2023-05-01T08:37:40.000Z","dependencies_parsed_at":"2024-11-06T22:41:39.856Z","dependency_job_id":"5f62e9c6-f399-4d0e-9f3b-5bb1d0b4133a","html_url":"https://github.com/vdechenaux/iso-9660","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdechenaux%2Fiso-9660","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdechenaux%2Fiso-9660/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdechenaux%2Fiso-9660/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdechenaux%2Fiso-9660/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdechenaux","download_url":"https://codeload.github.com/vdechenaux/iso-9660/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168362,"owners_count":21058823,"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":["cdrom","iso","iso9660","joliet","php","rockridge","stream-wrapper"],"created_at":"2024-11-06T22:37:37.175Z","updated_at":"2025-04-10T06:32:28.898Z","avatar_url":"https://github.com/vdechenaux.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ISO9660 Stream Wrapper for PHP\n\nPHP Stream Wrapper for ISO9660 files (.iso files)\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/vdechenaux/iso-9660/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/vdechenaux/iso-9660/tree/master)\n[![Coverage Status](https://coveralls.io/repos/github/vdechenaux/iso-9660/badge.svg?branch=master)](https://coveralls.io/github/vdechenaux/iso-9660?branch=master)\n\n## Usage\n\nInstall using Composer:\n\n```\n$ composer require vdechenaux/iso-9660\n```\n\nRegister the Stream Wrapper:\n\n```php\n\\ISO9660\\StreamWrapper::register();\n```\n\nUse it, with any function which supports stream wrappers:\n\n```php\n// Get the content\nfile_get_contents('iso9660://path/myIsoFile.iso#song.mp3');\n\n// Get the size\nfilesize('iso9660://path/myIsoFile.iso#song.mp3');\n\n// Check if ISO file contains a file\nfile_exists('iso9660://path/myIsoFile.iso#song.mp3');\n\n// List files\n$iterator = new RecursiveTreeIterator(new RecursiveDirectoryIterator('iso9660://myIsoFile.iso#'));\nforeach ($iterator as $entry) {\n    echo $entry.PHP_EOL;\n}\n\n// Get a stream on a file contained in the ISO file\n// Here, a PNG file\n$stream = fopen('iso9660://myIsoFile.iso#image.png', 'r');\nfseek($stream, 1); // Skip 1st byte\n$header = fread($stream, 3); // We should get \"PNG\"\n\n// Etc...\n```\n\nYou must separate the iso file and the internal path with a `#`, even if the right part is empty, like in above examples.\n\nYou can use the `\\ISO9660\\Reader` class if you don't want to use native PHP functions.\n\n### Custom context options\n\nYou can configure some behaviors of the reader:\n- `showHiddenFiles` (boolean, default: `false`) Set it to `true` to see/read hidden files.\n\nTo use options, you have to do something like this:\n\n```php\n$opts = [\n    'iso9660' =\u003e [\n        'showHiddenFiles'  =\u003e true,\n    ]\n];\n\n$context  = stream_context_create($opts);\n\nfile_get_contents('iso9660:///tmp/file.iso#hidden.mp3', false, $context);\n```\n\nIf you are using the `\\ISO9660\\Reader` class, you can use theses options by passing an `\\ISO9660\\ReaderOptions` object to the constructor.\n\n### Read from an optical drive\n\nAs this package is an ISO9660 implementation, you can directly read an optical drive by doing something like this:\n\n```php\n$iterator = new RecursiveTreeIterator(new RecursiveDirectoryIterator('iso9660:///dev/cdrom#'));\nforeach ($iterator as $entry) {\n    echo $entry.PHP_EOL;\n}\n```\n\nBy using `/dev/cdrom` instead of an ISO file, you can directly interact with the hardware, without mounting the disc in the OS.\n\n## ISO features supported\n\n- Basic ISO9660 support\n- Joliet support\n- SUSP\n    - `CE` Continuation Area\n    - `SP` System Use Sharing Protocol Indicator\n    - `ER` Extensions Reference (supported types: `RRIP_1991A`, `IEEE_P1282`, `IEEE_1282`)\n- Rock Ridge support\n    - `CL` Child link\n    - `PL` Parent link\n    - `NM` Alternate name\n    - `PX` POSIX file attributes\n    - `RE` Relocated directory\n    - `RR` Rock Ridge extensions in-use indicator\n    - `SL` Symbolic link\n    - `TF` Time stamp(s) for a file\n\n## Why ?\n\nWhy not ? 🤷‍♂️\n\nI made it only for fun. I hope someone will find a usage 😁\n\n## License\n\nThis project is released under [the MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdechenaux%2Fiso-9660","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdechenaux%2Fiso-9660","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdechenaux%2Fiso-9660/lists"}