{"id":23428694,"url":"https://github.com/marknjunge/easyfiles","last_synced_at":"2025-08-03T00:15:49.043Z","repository":{"id":110814806,"uuid":"77394289","full_name":"MarkNjunge/EasyFiles","owner":"MarkNjunge","description":"A simple way of performing common file interactions.","archived":false,"fork":false,"pushed_at":"2017-12-12T11:55:24.000Z","size":6040,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T13:19:50.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarkNjunge.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":"2016-12-26T16:11:34.000Z","updated_at":"2019-05-24T16:53:16.000Z","dependencies_parsed_at":"2023-04-04T08:31:21.528Z","dependency_job_id":null,"html_url":"https://github.com/MarkNjunge/EasyFiles","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MarkNjunge/EasyFiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkNjunge%2FEasyFiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkNjunge%2FEasyFiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkNjunge%2FEasyFiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkNjunge%2FEasyFiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkNjunge","download_url":"https://codeload.github.com/MarkNjunge/EasyFiles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkNjunge%2FEasyFiles/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268477180,"owners_count":24256453,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-23T07:14:30.288Z","updated_at":"2025-08-03T00:15:48.983Z","avatar_url":"https://github.com/MarkNjunge.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyFiles\nA Java \u0026 Kotlin library for simplifying common file interactions.\n\nThe library can:\n\n1. Copy, move or delete a file.\n\n2. Read and write a file by line.\n\n3. Read and write the contents of a file in bytes.\n\n4. Read the content of a file in tokens.\n\n5. Get filename and extension.\n\n# Usage\n**Requires Java 7+**\n\n**Java**\n\n```Java\nPath source = Paths.get(\"source.txt\");\nPath target = Paths.get(\"target.txt\");\n\n// Copy File\nEasyFiles.copyFileTo(source, target, new EasyFiles.ActionListeners() { // Action Successful listener\n    @Override\n    public void actionSuccessful() {\n        System.out.println(\"Copy successful!\");\n    }\n});\n\n// Delete file\nEasyFiles.deleteFile(source, () -\u003e System.out.println(\"Delete successful!\"));\n\n// Move file\nEasyFiles.moveFile(source, target, null); // No listener\n\n// Getting filename and extension\nMap\u003cString, String\u003e map = EasyFiles.getFileNameAndExtention(source);\nmap.get(EasyFiles.FILENAME);\nmap.get(EasyFiles.EXTENSION);\n\n// Read and write files by line\nList\u003cString\u003e contentLines = EasyFiles.readFileAsLines(source);\nEasyFiles.writeFileByLine(target, contentLines, true, null);\n\n// Read and write files by bytes\nbyte[] contentBytes = EasyFiles.readFileAsBytes(source);\nEasyFiles.writeFileByBytes(target, contentBytes, null);\n\n// Read file using tokens\nList\u003cString\u003e tokens = EasyFiles.readFileTokens(source, \"delimiter\");\n```\n**Kotlin**\n``` Kotlin\nval source = Paths.get(\"source.txt\")\nval target = Paths.get(\"target.txt\")\n\nval extension = source.extension \nval filename = source.filenameOnly\nsource.copyFileTo(target)\nsource.deleteFile()\nsource.moveFileTo(target)\nsource.readFileAsLines() // Returns: MutableList\u003cString\u003e\nsource.writeFileByLine(content, append) // Append is optional\n```\n\n# Installation\nDownload the latest version from releases or clone the repository and add the files to your project.  \n\n# License\nEasyFiles is licensed under Apache 2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarknjunge%2Feasyfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarknjunge%2Feasyfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarknjunge%2Feasyfiles/lists"}