102 VIM::DoCommand 'bprev' |
102 VIM::DoCommand 'bprev' |
103 unless $curbuf->Name; |
103 unless $curbuf->Name; |
104 END_PERL |
104 END_PERL |
105 endfunc |
105 endfunc |
106 endif |
106 endif |
|
107 |
|
108 func! vimrc#PrepDir(path, prune_days) abort |
|
109 if !filewritable(path) |
|
110 call mkdir(path, 'p', 0700) |
|
111 endif |
|
112 endfunc |
|
113 |
|
114 func! vimrc#PruneFiles(path, days) abort |
|
115 let l:path = expand(a:path) |
|
116 if isdirectory(l:path) |
|
117 for file in split(globpath(l:path, "*"), "\n") |
|
118 if localtime() > getftime(file) + 86400 * a:days |
|
119 delete(file) != 0 |
|
120 endif |
|
121 endfor |
|
122 else |
|
123 endfunc |