Hacker Newsnew | past | comments | ask | show | jobs | submit | stranger-ss's commentslogin

Thanos deletes files of the directory you’re currently standing in


If the number of files is odd, Thanos keeps things simple - no fractional file slicing yet

Example:

11 files -> deletes 5, keeps 6 (because 11 // 2 = 5)

1 file -> deletes 0, keeps 1


I reckon you should change it to delete half a file in such a case, it'll be pretty funny (basically call truncate(), and also rename the file to half the original name, heh).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: