On 08/02/09 23:18, John Beckett wrote:
> Dewr wrote:
>> can you check if there is a file by path and name?
>
> Example:
> :echo filereadable($MYVIMRC)
>
> John
Of course, if the file exists but you don't have read permission on it,
filereadable() will return FALSE, and yet in that case you will usually
not be able to overwrite it.
The same family of functions also includes
executable()
filewritable()
isdirectory()
In addition, findfile() and finddir() can search the directory hierarchy
both up and down, and they will return the empty string if nothing is found.
Best regards,
Tony.
--
Lubarsky's Law of Cybernetic Entomology:
There's always one more bug.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---