mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
fileinfo: rename os_file_info_get_inode
This commit is contained in:
@@ -688,7 +688,7 @@ static void set_b0_fname(ZERO_BL *b0p, buf_T *buf)
|
||||
FileInfo file_info;
|
||||
if (os_fileinfo((char *)buf->b_ffname, &file_info)) {
|
||||
long_to_char((long)file_info.stat.st_mtim.tv_sec, b0p->b0_mtime);
|
||||
long_to_char((long)os_file_info_get_inode(&file_info), b0p->b0_ino);
|
||||
long_to_char((long)os_fileinfo_inode(&file_info), b0p->b0_ino);
|
||||
buf_store_file_info(buf, &file_info);
|
||||
buf->b_mtime_read = buf->b_mtime;
|
||||
} else {
|
||||
@@ -3559,7 +3559,7 @@ fnamecmp_ino (
|
||||
|
||||
FileInfo file_info;
|
||||
if (os_fileinfo((char *)fname_c, &file_info)) {
|
||||
ino_c = os_file_info_get_inode(&file_info);
|
||||
ino_c = os_fileinfo_inode(&file_info);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3568,7 +3568,7 @@ fnamecmp_ino (
|
||||
* valid on this machine), use the inode from block 0.
|
||||
*/
|
||||
if (os_fileinfo((char *)fname_s, &file_info)) {
|
||||
ino_s = os_file_info_get_inode(&file_info);
|
||||
ino_s = os_fileinfo_inode(&file_info);
|
||||
} else {
|
||||
ino_s = (uint64_t)ino_block0;
|
||||
}
|
||||
|
@@ -389,7 +389,7 @@ void os_fileinfo_id(const FileInfo *file_info, FileID *file_id)
|
||||
/// @deprecated Use `FileID` instead, this function is only needed in memline.c
|
||||
/// @param file_info Pointer to the `FileInfo`
|
||||
/// @return the inode number
|
||||
uint64_t os_file_info_get_inode(const FileInfo *file_info)
|
||||
uint64_t os_fileinfo_inode(const FileInfo *file_info)
|
||||
{
|
||||
return file_info->stat.st_ino;
|
||||
}
|
||||
|
@@ -588,12 +588,12 @@ describe('fs function', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('os_file_info_get_inode', function()
|
||||
describe('os_fileinfo_inode', function()
|
||||
it('returns the inode from file_info', function()
|
||||
local file_info = file_info_new()
|
||||
local path = 'unit-test-directory/test.file'
|
||||
assert.is_true((fs.os_fileinfo(path, file_info)))
|
||||
local inode = fs.os_file_info_get_inode(file_info)
|
||||
local inode = fs.os_fileinfo_inode(file_info)
|
||||
eq(file_info[0].stat.st_ino, inode)
|
||||
end)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user