Skip to content
Tcl Source Code Artifact [55656e68e4]
Login

Artifact [55656e68e4]

Artifact 55656e68e4e1cc00cd7b9b0faae310dfebb0eab6420ba6fdc5961fcbab475862:

Ticket change [55656e68e4] - Ticket [516d581c047786f7|516d581c04] <i>A tcl command to report free usable space of a partition of native file system</i> status still Open with 3 other changes by anonymous on 2025-12-11 14:46:10.
D 2025-12-11T14:46:10.868
J icomment Sorry\sfor\sthis\svery\slate\scomplementary\sexplanation\sof\sthe\sneed\sexpressed\sin\sthis\sticket.\r\nOnce\sa\syear,\sour\sapplication\smakes\sa\scopy\sof\ssome\sof\sits\sSQLite\sdb\sfiles,\soutside\sof\sits\sworking\sarea\sfor\slong\sterm\sarchival\spurpose.\r\nBelow\sis\sa\ssmall\sTcl\sscript\sexerpt\sof\swhat\swe\sdo\s:\r\n\r\n============================================================================\r\n\r\n#\sa)\sCheck\savailable\sfree\susable\sspace\son\sthe\starget\s(in\sMo)\r\n\s\s\s\s\s\r\n\s\s\s\s\sset\sfreeArchiveSpace\s[exec\sjava\s-classpath\s[file\sjoin\s$::_currentdir\sLib]\sjava_HDfreespace\s$tclArchivesPath]\r\n\r\n#\sb)\sNeeded\sadditional\sfree\sspace\s(in\sMo)\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\r\n\s\s\s\s\sset\strentordbSpace\s\s[format\s%.2f\s[expr\s{[file\ssize\s[file\sjoin\s$::_currentdir\sData\strentordb.tr]]\s\s/\s1048576.0}]]\r\n\s\s\s\s\s\s\s\sset\strentordb2Space\s[format\s%.2f\s[expr\s{[file\ssize\s[file\sjoin\s$::_currentdir\sData\strentordb2.tr]]\s/\s1048576.0}]]\r\n\s\s\s\s\s\s\s\sset\sdbdocSpace\s\s\s\s\s\s[format\s%.2f\s[expr\s{[file\ssize\s[file\sjoin\s$::_currentdir\sEtats\sdbdoc.tr]]\s\s\s\s\s/\s1048576.0}]]\r\n\s\s\s\s\s\s\s\s\r\n\r\n\s\s\s\s\s\s\s\sif\s{$freeArchiveSpace\s<\s$trentordbSpace\s+\s$trentordb2Space\s+\s$dbdocSpace}\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\r\n\s\s\s\s\s\s\s\s\s\s\s\s#\s[A044]\sErreur\s:\sespace\sde\sstockage\sdisponible\s($freeArchiveSpace\sMo)\sinsuffisant.\r\n\s\s\s\s\s\s\s\s\s\s\s\stk_messageBox\s-parent\s\s.menuGeneral\s\\\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s-message\s[::msgcat::mc\sA044\s$freeArchiveSpace]\s\\\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s-type\sok\s-icon\serror\s-title\s$::_appName\r\n\s\s\s\s\s\s\s\s\s\s\s\s\r\n\s\s\s\s\s\s\s\s\s\s\s\s#\sarrĂȘt\sdes\straitements\r\n\s\s\s\s\s\s\s\s\s\s\s\sreturn\s9\r\n\s\s\s\s\s\s\s\s}\r\n\r\n============================================================================\r\n\r\nwhere\s:\r\n-\s"java_HDfreespace"\s:\sjava\sprogram'\sname\swhose\scode\swas\sprovided\sin\smy\sprevious\spost\r\n-\s$tclArchivesPath\scontains\sthe\sabsolute\spath\sto\sthe\sdirectory\swhere\sthe\sdb\sfiles\sare\sto\sbe\scopied\son\sthe\starget,\sand\spassed\sas\sargument\sto\sjava_HDfreespace\sprogram\r\n-\strentordb.tr,\strentordb2.tr\sand\sdbdoc.tr\sare\sthree\sSQlites\sdatabase\sfiles\sto\sbe\sarchived\r\n\r\nFinal\snote\s:\sbefore\sexecuting\sthe\sabove\sexcerpt,\sthe\sapplication\stries\sto\sshrink\sthe\sdb\sfiles\sas\smuch\sas\spossible\swith\sVACUUM\sSQL\scommand,\swhose\slogic\sby\smaking\sa\stemporary\scopy\sof\sthe\sdb\sfile\sprocessed,\sneeds\sbeforehand\sa\scheck\sof\savailable\sspace\swhere\sthe\sapplication\sresides.\sIt\sis\sagain\sdone\sin\sinvoking\sthe\sjava\sprogram\sdescribed\sin\sthis\sticket.\r\n\r\nThank\syou\sagain\r\nJean-Marie
J login anonymous
J mimetype text/plain
K 516d581c047786f7a51e1a574e43e8832447cc07
U anonymous
Z 143343e3ec94b4e9d7a95b452418633f