aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/fs.c
Commit message (Collapse)AuthorAge
* os_nodetype: open fd with O_NONBLOCK (#5515)Justin M. Keyes2016-10-21
| | | | | Closes #5267 Helped-by: oni-link <knil.ino@gmail.com>
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* Create os_translate_sys_error()Rui Abreu Ferreira2016-08-07
| | | | | | Wrap up uv_translate_sys_error and fallbacks into a new function os_translate_sys_error(). In windows a copy of the original uv_translate_sys_error() was imported from libuv.
* os_resolve_shortcut: Report conversion error.Justin M. Keyes2016-07-30
|
* mbyte.c: Move utf8/utf16 functions to mbyte.cJustin M. Keyes2016-07-30
|
* utf16_to_utf8Justin M. Keyes2016-07-30
|
* os_resolve_shortcut: cleanupJustin M. Keyes2016-07-30
|
* os_resolve_shortcut: Remove legacy win16 codepath.Justin M. Keyes2016-07-30
|
* utf8_to_utf16: adapt libuv's fs__capture_pathJustin M. Keyes2016-07-30
|
* os_resolve_shortcut: initial port from Vim sourceJustin M. Keyes2016-07-30
|
* Remove redundant includes of unistd.h (#5126)Rui Abreu Ferreira2016-07-29
|
* os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu2016-07-06
| | | | Because the old name did not indicate that the function would return true on directories as well.
* *: Satisfy linter (newest type casts rule)ZyX2016-06-24
|
* file: Add buffered reading and writingZyX2016-06-23
| | | | Still no busted tests. Not tested without HAVE_PREADV.
* file,os/fs,shada: Separate opening, closing, writing and reading filesZyX2016-06-23
| | | | | | | | Moves low-level functions handling to os/fs.c. Adds file.c with a proxy interface. Target: while leaving syscalls handling is os.c (partially handled by libuv), add buffering for reading and writing to file.c.
* Remove some unnecessary function attributes (#4909)oni-link2016-06-11
| | | | This removes attribute FUNC_ATTR_NONNULL_ALL for functions without a pointer parameter.
* os_nodetype: Return NODE_NORMAL if os_stat fails.Justin M. Keyes2016-05-22
| | | | | | | | Conforms to Vim's mch_nodetype. Regression by 7db4a15. buf_write() expects NODE_WRITABLE for character devices such as /dev/stderr. Closes #4772
* Windows: Fix os_nodetype() default returnRui Abreu Ferreira2016-05-06
|
* vim-patch:7.4.672KillTheMule2016-05-02
| | | | | | | | | | | Problem: When completing a shell command, directories in the current directory are not listed. Solution: When "." is not in $PATH also look in the current directory for directories. https://github.com/vim/vim/commit/b5971141dff0c69355fd64196fcc0d0d071d4c82 Most of it applied manually.
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* Add missing include fcntl.hRui Abreu Ferreira2016-04-29
| | | | In Windows, open() flags like O_RDONLY need fcntl.h.
* os_nodetype: impl with libuvJustin M. Keyes2016-04-29
|
* vim-patch:7.4.1114Jurica Bradaric2016-04-20
| | | | | | | Problem: delete() does not work well with symbolic links. Solution: Recognize symbolik links. https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
* path.c: enable -WconversionCharles Joachim2016-03-27
|
* Windows: use $PATHEXT to find executables in path.Rui Abreu Ferreira2016-01-30
| | | | | | | | | | | is_executable_in_path() searches for executables in $PATH, but on Windows executable files have extensions available in the environment var $PATHEXT. This commit changes is_executable_in_path() to append those extensions to the filename. This patch diverges from standard Vim, in that Vim only checked for the given filename if it already has an extensions. This one always checks for the given filename.
* Windows: use ';' as env $PATH separator.Rui Abreu Ferreira2016-01-11
| | | | | | In Windows the separator character in the PATH environment is ';' instead of ':'. Add a new define ENV_SEPCHAR to be used instead of hardcoding the character literal.
* Port fsync() to libuv.Seth Jackson2016-01-01
|
* Return libuv error code from os_getperm()Rui Abreu Ferreira2015-11-25
| | | | | | | | | | | Previously os_getperms() returned -1 for any error condition, it now returns the libuv error code (as returned by os_stat()). This allows checking for error conditions without relying on errno (which not available in Windows). The only case where the errno value from os_getperms() was being used was in readfile() to set the new-file flag - replaced the errno check with UV_ENOENT.
* Return libuv return code from os_stat()Rui Abreu Ferreira2015-11-25
| | | | | | Instead of returning bool from os_stat return the actual libuv return code. This function is static and used internally in nvim/os/fs.c it should not impact the rest of the API. This is a first step to change other fs functions.
* Fix comments for os_* functions return valueRui Abreu Ferreira2015-11-25
| | | | | | In windows libuv does not return -errno, instead it uses negative error codes e.g. UV_ENOENT. This commit changes the comments in os_* functions to reflect this.
* os/fs.c: Convert stray getenv() to os_getenv()Michael Reed2015-10-31
| | | | | | | This is the last direct getenv() call in the tree (besides the one in os_getenv()); most of the work was already done in [1]. [1]: 412d246be71bd99cb4edde4e6f984b0b0d91bcd9
* os/fs: Allow os_mkdir_recurse directory name to end with ///ZyX2015-10-23
|
* do_path_expand: Avoid non-readable directories. #3273Felipe Morales2015-09-04
| | | | | | | | | | Closes https://github.com/neovim/neovim/issues/3164 Closes https://github.com/neovim/neovim/issues/3194 Closes https://github.com/neovim/neovim/issues/3221 Helped-by: @splinterofchaos Helped-by: @oni-link Helped-by: @justinmk
* Windows: is_executable(): do not check exec bit.Rui Abreu Ferreira2015-08-23
| | | | | | | | | In Windows there is no equivalent to the filesystem executable bit; the documentation states that for Windows :executable() returns 1 for all files. But this behaviour was broken because is_executable() checked for the UNIX bit. When WIN32 is defined we now skip the S_IXUSR check.
* os/fs.c: remove os_file_is_readonly()Justin M. Keyes2015-08-17
| | | | | | | | | | | | | | | | | | | os_file_is_readonly() in its current form is equivalent to !os_file_is_writable(). This does not appear to be a bug, because Vim's use of check_file_readonly() (which we changed to os_file_is_readonly()) is equivalent to !os_file_is_writable() in every case. os_file_is_readonly() also fails this test: returns false if the file is non-read, non-write A more useful form would define behavior under these cases: - path is executable (but not writable) - path is non-existent - path is directory But there is no reason for os_file_is_readonly() to exist, so remove it.
* os_file_is_*: libuv implJustin M. Keyes2015-08-17
| | | | | | - uv_fs_access() is far more robust than access(). In particular, it handles utf16 paths (Windows). - Still need R_OK, W_OK in win_defs.h
* fs.c: implement os_file_is_readable()Justin M. Keyes2015-08-17
| | | | | | | Use access() because: - We already use it for os_file_is_writable() - Vim's old check_file_readonly() ends up using access() after all.
* os/fs: Move mkdir_recurse from eval.c to os/fs.cZyX2015-07-26
|
* os/fs: Use module-local uv_loop_t instanceThiago de Arruda2015-07-01
| | | | | | This event loop is just a stub instance used in synchronous libuv function calls, it needs to be decoupled from the main event loop in order to run it from another thread.
* Remove char_u: message:smsg()Michael Reed2015-05-13
|
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim.
* os_scandir(), scandir_next(), and os_closedir()Scott Prager2015-03-31
|
* Remove unnecessary assert() in os_dirname().oni-link2015-03-08
| | | | | | | | | Compiler warns about buf always being nonnull. buf is per function attribute always nonnull, so buf can be removed from the assert(). But a buffer length of zero is also no problem, because it makes uv_cwd() return a failure without writing into buf. So the remaining length check can also be removed.
* Linting: Fix strcpy warning.Florian Walch2014-12-24
|
* fs.c: add FUNC_ATTR_NONNULL_ALL to all functionsJustin M. Keyes2014-10-30
|
* memory: xstrchrnul and xmemscan.Scott Prager2014-09-30
|
* vim-patch:7.4.235Scott Prager2014-09-17
| | | | | | | Problem: It is not easy to get the full path of a command. Solution: Add the exepath() function. https://code.google.com/p/vim/source/detail?r=5ab2946f7ce560985830fbc3c453bb0f7a01f385
* fileinfo: change returntype of os_fileinfo_sizeStefan Hoffmann2014-08-31
| | | | off_t -> uint64_t
* fileid: rename os_file_id_equal_file_infoStefan Hoffmann2014-08-31
|
* fileid: rename os_file_id_equalStefan Hoffmann2014-08-31
|