Skip to content

Commit

Permalink
Merge pull request #36 from docwhat/pr/windows-file-exist
Browse files Browse the repository at this point in the history
Implemented WindowsFile#exist?
  • Loading branch information
arlimus committed Dec 7, 2015
2 parents 8dd1acf + 4209fda commit 66c92f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/train/extras/windows_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def content
end

def exist?
nil
return @exist if defined?(@exist)
@exist = @backend.run_command(
"(Test-Path -Path \"#{@spath}\").ToString()").stdout.chomp == 'True'
end

def link_target
Expand Down

0 comments on commit 66c92f0

Please sign in to comment.