Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide functionality to retrieve file/folder metadata through the fs lib #51

Closed
ShaneButt opened this issue Jun 8, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@ShaneButt
Copy link

Currently there is no way to retrieve file metadata such as creation/modification date, file/folder sizes, and the like. At present Lune does not provide a method to get this information and a workaround is using powershell (or otherwise) and the "Get-Item" command, this does work to a point - retrieving the modification date & file size in bytes, though it's not nearly everything.

My use-case for this is to 'diff' two files (an asset and a place) to ensure that a file that's been modified will be updated and synced so long as it's modification date precedes the last modification date of a target place file, this would then allow me to move away from the not-so-agnostic powershell 'Get-Item' command, and also provide even more useful information.

It would also be helpful if the DateTime library came with this change so parsing of the dates is easier, attached is my solution to the DateTime and file metadata problem (thought do note these files are from when lune was moderately fresh and I was learning the ropes), the main file (for this issue) is canSyncAsset.luau though to understand it's use I've provided the full sync and build scripts for context.
sync scripts.zip

@filiptibell filiptibell added the enhancement New feature or request label Jun 8, 2023
@filiptibell filiptibell added this to the 0.8.0 milestone Jun 12, 2023
@filiptibell
Copy link
Collaborator

Implemented in bca3de9 , will be in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants