diff options
author | w0rp <devw0rp@gmail.com> | 2017-03-31 20:14:53 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-03-31 20:14:53 +0100 |
commit | 7c736579b72a79d955d090db35adf8c751a79fd8 (patch) | |
tree | 81a647646b6136bfebb6864461096f490b4af589 /autoload | |
parent | 7a8dbe1139b698cff7c7e04e5e27a40a8ffec5f5 (diff) | |
download | ale-7c736579b72a79d955d090db35adf8c751a79fd8.zip |
Fix #438 Create Java .class files for javac in a temporary directory
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 3e440d1f..f1b27bb7 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -152,6 +152,17 @@ function! ale#engine#ManageDirectory(buffer, directory) abort call add(g:ale_buffer_info[a:buffer].temporary_directory_list, a:directory) endfunction +" Create a new temporary directory and manage it in one go. +function! ale#engine#CreateDirectory(buffer) abort + let l:temporary_directory = tempname() + " Create the temporary directory for the file, unreadable by 'other' + " users. + call mkdir(l:temporary_directory, '', 0750) + call ale#engine#ManageDirectory(a:buffer, l:temporary_directory) + + return l:temporary_directory +endfunction + function! ale#engine#RemoveManagedFiles(buffer) abort if !has_key(g:ale_buffer_info, a:buffer) return |