summaryrefslogtreecommitdiff
path: root/lib/chef/win32/api/file.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-02 11:11:35 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-02 11:13:54 -0700
commit77f8739a4741e2370e40ec39345a92a6ea393a1a (patch)
treebcf3c9a12556ce1fd18a83cd5f68cd24d36a1180 /lib/chef/win32/api/file.rb
parent90a74a80196725c4198b6042e8485d68c70777ac (diff)
downloadchef-77f8739a4741e2370e40ec39345a92a6ea393a1a.tar.gz
fix Layout/AlignArgumentslcg/new-chefstyle
this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/win32/api/file.rb')
-rw-r--r--lib/chef/win32/api/file.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb
index e09fdd0ae4..eea46ce87d 100644
--- a/lib/chef/win32/api/file.rb
+++ b/lib/chef/win32/api/file.rb
@@ -189,7 +189,7 @@ class Chef
# see https://msdn.microsoft.com/en-us/library/windows/desktop/ms647464(v=vs.85).aspx
class Translation < FFI::Struct
layout :w_lang, :WORD,
- :w_code_page, :WORD
+ :w_code_page, :WORD
end
=begin
@@ -200,7 +200,7 @@ typedef struct _FILETIME {
=end
class FILETIME < FFI::Struct
layout :dw_low_date_time, :DWORD,
- :dw_high_date_time, :DWORD
+ :dw_high_date_time, :DWORD
end
=begin
@@ -212,8 +212,8 @@ typedef struct _SECURITY_ATTRIBUTES {
=end
class SECURITY_ATTRIBUTES < FFI::Struct
layout :n_length, :DWORD,
- :lp_security_descriptor, :LPVOID,
- :b_inherit_handle, :DWORD
+ :lp_security_descriptor, :LPVOID,
+ :b_inherit_handle, :DWORD
end
=begin
@@ -232,15 +232,15 @@ typedef struct _WIN32_FIND_DATA {
=end
class WIN32_FIND_DATA < FFI::Struct
layout :dw_file_attributes, :DWORD,
- :ft_creation_time, FILETIME,
- :ft_last_access_time, FILETIME,
- :ft_last_write_time, FILETIME,
- :n_file_size_high, :DWORD,
- :n_file_size_low, :DWORD,
- :dw_reserved_0, :DWORD,
- :dw_reserved_1, :DWORD,
- :c_file_name, [:BYTE, MAX_PATH * 2],
- :c_alternate_file_name, [:BYTE, 14]
+ :ft_creation_time, FILETIME,
+ :ft_last_access_time, FILETIME,
+ :ft_last_write_time, FILETIME,
+ :n_file_size_high, :DWORD,
+ :n_file_size_low, :DWORD,
+ :dw_reserved_0, :DWORD,
+ :dw_reserved_1, :DWORD,
+ :c_file_name, [:BYTE, MAX_PATH * 2],
+ :c_alternate_file_name, [:BYTE, 14]
end
=begin
@@ -259,15 +259,15 @@ typedef struct _BY_HANDLE_FILE_INFORMATION {
=end
class BY_HANDLE_FILE_INFORMATION < FFI::Struct
layout :dw_file_attributes, :DWORD,
- :ft_creation_time, FILETIME,
- :ft_last_access_time, FILETIME,
- :ft_last_write_time, FILETIME,
- :dw_volume_serial_number, :DWORD,
- :n_file_size_high, :DWORD,
- :n_file_size_low, :DWORD,
- :n_number_of_links, :DWORD,
- :n_file_index_high, :DWORD,
- :n_file_index_low, :DWORD
+ :ft_creation_time, FILETIME,
+ :ft_last_access_time, FILETIME,
+ :ft_last_write_time, FILETIME,
+ :dw_volume_serial_number, :DWORD,
+ :n_file_size_high, :DWORD,
+ :n_file_size_low, :DWORD,
+ :n_number_of_links, :DWORD,
+ :n_file_index_high, :DWORD,
+ :n_file_index_low, :DWORD
end
=begin
@@ -563,7 +563,7 @@ BOOL WINAPI VerQueryValue(
def file_handle(path)
path = canonical_encode_path(path)
handle = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ,
- nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, nil)
+ nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, nil)
if handle == INVALID_HANDLE_VALUE
Chef::ReservedNames::Win32::Error.raise!
@@ -577,7 +577,7 @@ BOOL WINAPI VerQueryValue(
def symlink_file_handle(path)
path = encode_path(path)
handle = CreateFileW(path, FILE_READ_EA, FILE_SHARE_READ,
- nil, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, nil)
+ nil, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, nil)
if handle == INVALID_HANDLE_VALUE
Chef::ReservedNames::Win32::Error.raise!