Hi,
I have an item that returns file info. (vfs.file.get[/home/user/file.txt]
I get back a string that looks like this:
{"basename":"antipase_tag.txt","pathname":"/home/user/file.txt","dirname":"/home/user/","type":"file","user":"appuser","group":"appgroup ","permissions":"0664","uid":1000,"gid":300,"size" :86,"time":{"access":"2023-05-23T13:19:10.989292448+02:00","modify":"2023-05-23T13:19:10.989292448+02:00","change":"2023-05-23T13:19:10.989292448+02:00"},"timestamp":{"access ":1684840750,"modify":1684840750,"change":16848407 50}}
I want to clean this up so that everything after "size" is removed. Basically, I need to know if this files permissions have changed - and I think this is the best way.
I thought a "Right Trim" was the answer here - but its not working for me.
If I use a "Left Trim" it also doesn't trim!
I have tried every variation of the "size" marker as possible - "size" "size" *size* *size. etc - I really just cant get this to work. Seems like something simple.
Any help appreciated.
I have an item that returns file info. (vfs.file.get[/home/user/file.txt]
I get back a string that looks like this:
{"basename":"antipase_tag.txt","pathname":"/home/user/file.txt","dirname":"/home/user/","type":"file","user":"appuser","group":"appgroup ","permissions":"0664","uid":1000,"gid":300,"size" :86,"time":{"access":"2023-05-23T13:19:10.989292448+02:00","modify":"2023-05-23T13:19:10.989292448+02:00","change":"2023-05-23T13:19:10.989292448+02:00"},"timestamp":{"access ":1684840750,"modify":1684840750,"change":16848407 50}}
I want to clean this up so that everything after "size" is removed. Basically, I need to know if this files permissions have changed - and I think this is the best way.
I thought a "Right Trim" was the answer here - but its not working for me.
If I use a "Left Trim" it also doesn't trim!
I have tried every variation of the "size" marker as possible - "size" "size" *size* *size. etc - I really just cant get this to work. Seems like something simple.
Any help appreciated.
Comment