Module: Windows::File
Constant Summary collapse
- FILE_ATTRIBUTE_READONLY =
File Attributes
0x00000001- FILE_ATTRIBUTE_HIDDEN =
0x00000002- FILE_ATTRIBUTE_SYSTEM =
0x00000004- FILE_ATTRIBUTE_DIRECTORY =
0x00000010- FILE_ATTRIBUTE_ARCHIVE =
0x00000020- FILE_ATTRIBUTE_ENCRYPTED =
0x00000040- FILE_ATTRIBUTE_NORMAL =
0x00000080- FILE_ATTRIBUTE_TEMPORARY =
0x00000100- FILE_ATTRIBUTE_SPARSE_FILE =
0x00000200- FILE_ATTRIBUTE_REPARSE_POINT =
0x00000400- FILE_ATTRIBUTE_COMPRESSED =
0x00000800- FILE_ATTRIBUTE_OFFLINE =
0x00001000- FILE_ATTRIBUTE_NOT_CONTENT_INDEXED =
0x00002000- FILE_TYPE_UNKNOWN =
File types
0x0000- FILE_TYPE_DISK =
0x0001- FILE_TYPE_CHAR =
0x0002- FILE_TYPE_PIPE =
0x0003- FILE_TYPE_REMOTE =
0x8000- APPLICATION_ERROR_MASK =
File security and access rights
0x20000000- ERROR_SEVERITY_SUCCESS =
0x00000000- ERROR_SEVERITY_INFORMATIONAL =
0x40000000- ERROR_SEVERITY_WARNING =
0x80000000- ERROR_SEVERITY_ERROR =
0xc0000000- COMPRESSION_FORMAT_NONE =
0- COMPRESSION_FORMAT_DEFAULT =
1- COMPRESSION_FORMAT_LZNT1 =
2- COMPRESSION_ENGINE_STANDARD =
0- COMPRESSION_ENGINE_MAXIMUM =
256- ACCESS_ALLOWED_ACE_TYPE =
0- ACCESS_DENIED_ACE_TYPE =
1- ANYSIZE_ARRAY =
1- SYSTEM_AUDIT_ACE_TYPE =
2- SYSTEM_ALARM_ACE_TYPE =
3- OBJECT_INHERIT_ACE =
1- CONTAINER_INHERIT_ACE =
2- NO_PROPAGATE_INHERIT_ACE =
4- INHERIT_ONLY_ACE =
8- VALID_INHERIT_FLAGS =
16- SUCCESSFUL_ACCESS_ACE_FLAG =
64- FAILED_ACCESS_ACE_FLAG =
128- DELETE =
0x00010000- READ_CONTROL =
0x20000- WRITE_DAC =
0x40000- WRITE_OWNER =
0x80000- SYNCHRONIZE =
0x100000- STANDARD_RIGHTS_REQUIRED =
0xf0000- STANDARD_RIGHTS_READ =
0x20000- STANDARD_RIGHTS_WRITE =
0x20000- STANDARD_RIGHTS_EXECUTE =
0x20000- STANDARD_RIGHTS_ALL =
0x1f0000- SPECIFIC_RIGHTS_ALL =
0xffff- ACCESS_SYSTEM_SECURITY =
0x1000000- MAXIMUM_ALLOWED =
0x2000000- GENERIC_READ =
0x80000000- GENERIC_WRITE =
0x40000000- GENERIC_EXECUTE =
0x20000000- GENERIC_ALL =
0x10000000- FILE_READ_DATA =
1- FILE_LIST_DIRECTORY =
1- FILE_WRITE_DATA =
2- FILE_ADD_FILE =
2- FILE_APPEND_DATA =
4- FILE_ADD_SUBDIRECTORY =
4- FILE_CREATE_PIPE_INSTANCE =
4- FILE_READ_EA =
8- FILE_READ_PROPERTIES =
8- FILE_WRITE_EA =
16- FILE_WRITE_PROPERTIES =
16- FILE_EXECUTE =
32- FILE_TRAVERSE =
32- FILE_DELETE_CHILD =
64- FILE_READ_ATTRIBUTES =
128- FILE_WRITE_ATTRIBUTES =
256- FILE_ALL_ACCESS =
(STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x1ff)
- FILE_GENERIC_READ =
(STANDARD_RIGHTS_READ|FILE_READ_DATA| FILE_READ_ATTRIBUTES|FILE_READ_EA|SYNCHRONIZE)
- FILE_GENERIC_WRITE =
(STANDARD_RIGHTS_WRITE|FILE_WRITE_DATA| FILE_WRITE_ATTRIBUTES|FILE_WRITE_EA|FILE_APPEND_DATA|SYNCHRONIZE)
- FILE_GENERIC_EXECUTE =
(STANDARD_RIGHTS_EXECUTE|FILE_READ_ATTRIBUTES| FILE_EXECUTE|SYNCHRONIZE)
- FILE_SHARE_READ =
1- FILE_SHARE_WRITE =
2- FILE_SHARE_DELETE =
4- FILE_NOTIFY_CHANGE_FILE_NAME =
1- FILE_NOTIFY_CHANGE_DIR_NAME =
2- FILE_NOTIFY_CHANGE_ATTRIBUTES =
4- FILE_NOTIFY_CHANGE_SIZE =
8- FILE_NOTIFY_CHANGE_LAST_WRITE =
16- FILE_NOTIFY_CHANGE_LAST_ACCESS =
32- FILE_NOTIFY_CHANGE_CREATION =
64- FILE_NOTIFY_CHANGE_SECURITY =
256- MAILSLOT_NO_MESSAGE =
-1
- MAILSLOT_WAIT_FOREVER =
-1
- FILE_CASE_SENSITIVE_SEARCH =
1- FILE_CASE_PRESERVED_NAMES =
2- FILE_UNICODE_ON_DISK =
4- FILE_PERSISTENT_ACLS =
8- FILE_FILE_COMPRESSION =
16- FILE_VOLUME_QUOTAS =
32- FILE_SUPPORTS_SPARSE_FILES =
64- FILE_SUPPORTS_REPARSE_POINTS =
128- FILE_SUPPORTS_REMOTE_STORAGE =
256- FILE_VOLUME_IS_COMPRESSED =
0x8000- FILE_SUPPORTS_OBJECT_IDS =
0x10000- FILE_SUPPORTS_ENCRYPTION =
0x20000- FILE_FLAG_WRITE_THROUGH =
File flags
0x80000000- FILE_FLAG_OVERLAPPED =
0x40000000- FILE_FLAG_NO_BUFFERING =
0x20000000- FILE_FLAG_RANDOM_ACCESS =
0x10000000- FILE_FLAG_SEQUENTIAL_SCAN =
0x08000000- FILE_FLAG_DELETE_ON_CLOSE =
0x04000000- FILE_FLAG_BACKUP_SEMANTICS =
0x02000000- FILE_FLAG_POSIX_SEMANTICS =
0x01000000- FILE_FLAG_OPEN_REPARSE_POINT =
0x00200000- FILE_FLAG_OPEN_NO_RECALL =
0x00100000- FILE_FLAG_FIRST_PIPE_INSTANCE =
0x00080000- CREATE_NEW =
File creation disposition
1- CREATE_ALWAYS =
2- OPEN_EXISTING =
3- OPEN_ALWAYS =
4- TRUNCATE_EXISTING =
5- SECTION_QUERY =
0x0001- SECTION_MAP_WRITE =
0x0002- SECTION_MAP_READ =
0x0004- SECTION_MAP_EXECUTE =
0x0008- SECTION_EXTEND_SIZE =
0x0010- SECTION_ALL_ACCESS =
STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE
- INVALID_FILE_ATTRIBUTES =
Errors
-1
- INVALID_HANDLE_VALUE =
-1
- INVALID_FILE_SIZE =
0xFFFFFFFF- LOCKFILE_EXCLUSIVE_LOCK =
Misc
0x00000001- LOCKFILE_FAIL_IMMEDIATELY =
0x00000002- CopyFile =
Win32API.new('kernel32', 'CopyFile', 'PPI', 'I')
- CopyFileA =
Win32API.new('kernel32', 'CopyFileA', 'PPI', 'I')
- CopyFileW =
Win32API.new('kernel32', 'CopyFileW', 'PPI', 'I')
- CopyFileEx =
Win32API.new('kernel32', 'CopyFileEx', 'PPPPPL', 'I')
- CopyFileExA =
Win32API.new('kernel32', 'CopyFileExA', 'PPPPPL', 'I')
- CopyFileExW =
Win32API.new('kernel32', 'CopyFileExW', 'PPPPPL', 'I')
- CreateFile =
Win32API.new('kernel32', 'CreateFile', 'PLLPLLL', 'L')
- CreateFileA =
Win32API.new('kernel32', 'CreateFileA', 'PLLPLLL', 'L')
- CreateFileW =
Win32API.new('kernel32', 'CreateFileW', 'PLLPLLL', 'L')
- CreateHardLink =
Win32API.new('kernel32', 'CreateHardLink', 'PPP', 'I')
- CreateHardLinkA =
Win32API.new('kernel32', 'CreateHardLinkA', 'PPP', 'I')
- CreateHardLinkW =
Win32API.new('kernel32', 'CreateHardLinkW', 'PPP', 'I')
- DecryptFile =
Win32API.new('advapi32', 'DecryptFile', 'PL', 'I')
- DecryptFileA =
Win32API.new('advapi32', 'DecryptFileA', 'PL', 'I')
- DecryptFileW =
Win32API.new('advapi32', 'DecryptFileW', 'PL', 'I')
- DeleteFile =
Win32API.new('kernel32', 'DeleteFile', 'P', 'I')
- DeleteFileA =
Win32API.new('kernel32', 'DeleteFileA', 'P', 'I')
- DeleteFileW =
Win32API.new('kernel32', 'DeleteFileW', 'P', 'I')
- EncryptFile =
Win32API.new('advapi32', 'EncryptFile', 'P', 'I')
- EncryptFileA =
Win32API.new('advapi32', 'EncryptFileA', 'P', 'I')
- EncryptFileW =
Win32API.new('advapi32', 'EncryptFileW', 'P', 'I')
- GetBinaryType =
Win32API.new('kernel32', 'GetBinaryType', 'PP', 'I')
- GetBinaryTypeA =
Win32API.new('kernel32', 'GetBinaryTypeA', 'PP', 'I')
- GetBinaryTypeW =
Win32API.new('kernel32', 'GetBinaryTypeW', 'PP', 'I')
- GetFileAttributes =
Win32API.new('kernel32', 'GetFileAttributes', 'P', 'L')
- GetFileAttributesA =
Win32API.new('kernel32', 'GetFileAttributesA', 'P', 'L')
- GetFileAttributesW =
Win32API.new('kernel32', 'GetFileAttributesW', 'P', 'L')
- GetFileAttributesEx =
Win32API.new('kernel32', 'GetFileAttributesEx', 'PPP', 'I')
- GetFileAttributesExA =
Win32API.new('kernel32', 'GetFileAttributesExA', 'PPP', 'I')
- GetFileAttributesExW =
Win32API.new('kernel32', 'GetFileAttributesExW', 'PPP', 'I')
- GetFileSize =
Win32API.new('kernel32', 'GetFileSize', 'LP', 'L')
- GetFileSizeEx =
Win32API.new('kernel32', 'GetFileSizeEx', 'LP', 'L')
- GetFileType =
Win32API.new('kernel32', 'GetFileType', 'L', 'L')
- GetFullPathName =
Win32API.new('kernel32', 'GetFullPathName', 'PLPP', 'L')
- GetFullPathNameA =
Win32API.new('kernel32', 'GetFullPathNameA', 'PLPP', 'L')
- GetFullPathNameW =
Win32API.new('kernel32', 'GetFullPathNameW', 'PLPP', 'L')
- GetLongPathName =
Win32API.new('kernel32', 'GetLongPathName', 'PPL', 'L')
- GetLongPathNameA =
Win32API.new('kernel32', 'GetLongPathNameA', 'PPL', 'L')
- GetLongPathNameW =
Win32API.new('kernel32', 'GetLongPathNameW', 'PPL', 'L')
- GetShortPathName =
Win32API.new('kernel32', 'GetShortPathName', 'PPL', 'L')
- GetShortPathNameA =
Win32API.new('kernel32', 'GetShortPathNameA', 'PPL', 'L')
- GetShortPathNameW =
Win32API.new('kernel32', 'GetShortPathNameW', 'PPL', 'L')
- LockFile =
Win32API.new('kernel32', 'LockFile', 'LLLLL', 'I')
- LockFileEx =
Win32API.new('kernel32', 'LockFileEx', 'LLLLLL', 'I')
- ReadFile =
Win32API.new('kernel32', 'ReadFile', 'LPLPP', 'I')
- ReadFileEx =
Win32API.new('kernel32', 'ReadFileEx', 'LPLPP', 'I')
- SetFileAttributes =
Win32API.new('kernel32', 'SetFileAttributes', 'PL', 'I')
- SetFileAttributesA =
Win32API.new('kernel32', 'SetFileAttributesA', 'PL', 'I')
- SetFileAttributesW =
Win32API.new('kernel32', 'SetFileAttributesW', 'PL', 'I')
- UnlockFile =
Win32API.new('kernel32', 'UnlockFile', 'LLLLL', 'I')
- UnlockFileEx =
Win32API.new('kernel32', 'UnlockFileEx', 'LLLLL', 'I')
- WriteFile =
Win32API.new('kernel32', 'WriteFile', 'LPLPP', 'I')
- WriteFileEx =
Win32API.new('kernel32', 'WriteFileEx', 'LPLPP', 'I')
Constants included from Unicode
Unicode::ANSI_CHARSET, Unicode::ARABIC_CHARSET, Unicode::CHINESEBIG5_CHARSET, Unicode::CP_ACP, Unicode::CP_MACCP, Unicode::CP_OEMCP, Unicode::CP_SYMBOL, Unicode::CP_THREAD_ACP, Unicode::CP_UTF7, Unicode::CP_UTF8, Unicode::DEFAULT_CHARSET, Unicode::EASTEUROPE_CHARSET, Unicode::GB2312_CHARSET, Unicode::GREEK_CHARSET, Unicode::GetTextCharset, Unicode::GetTextCharsetInfo, Unicode::HANGEUL_CHARSET, Unicode::HANGUL_CHARSET, Unicode::HEBREW_CHARSET, Unicode::IS_TEXT_UNICODE_ASCII16, Unicode::IS_TEXT_UNICODE_CONTROLS, Unicode::IS_TEXT_UNICODE_DBCS_LEADBYTE, Unicode::IS_TEXT_UNICODE_ILLEGAL_CHARS, Unicode::IS_TEXT_UNICODE_NOT_ASCII_MASK, Unicode::IS_TEXT_UNICODE_NOT_UNICODE_MASK, Unicode::IS_TEXT_UNICODE_NULL_BYTES, Unicode::IS_TEXT_UNICODE_ODD_LENGTH, Unicode::IS_TEXT_UNICODE_REVERSE_ASCII16, Unicode::IS_TEXT_UNICODE_REVERSE_CONTROLS, Unicode::IS_TEXT_UNICODE_REVERSE_MASK, Unicode::IS_TEXT_UNICODE_REVERSE_SIGNATURE, Unicode::IS_TEXT_UNICODE_REVERSE_STATISTICS, Unicode::IS_TEXT_UNICODE_SIGNATURE, Unicode::IS_TEXT_UNICODE_STATISTICS, Unicode::IS_TEXT_UNICODE_UNICODE_MASK, Unicode::IsDBCSLeadByte, Unicode::IsDBCSLeadByteEx, Unicode::IsTextUnicode, Unicode::JOHAB_CHARSET, Unicode::MB_COMPOSITE, Unicode::MB_ERR_INVALID_CHARS, Unicode::MB_PRECOMPOSED, Unicode::MB_USEGLYPHCHARS, Unicode::MultiByteToWideChar, Unicode::OEM_CHARSET, Unicode::RUSSIAN_CHARSET, Unicode::SHIFTJIS_CHARSET, Unicode::SYMBOL_CHARSET, Unicode::TCI_SRCCHARSET, Unicode::TCI_SRCCODEPAGE, Unicode::TCI_SRCFONTSIG, Unicode::TCI_SRCLOCALE, Unicode::THAI_CHARSET, Unicode::TURKISH_CHARSET, Unicode::TranslateCharsetInfo, Unicode::VIETNAMESE_CHARSET, Unicode::WC_COMPOSITECHECK, Unicode::WC_DEFAULTCHAR, Unicode::WC_DISCARDNS, Unicode::WC_NO_BEST_FIT_CHARS, Unicode::WC_SEPCHARS, Unicode::WideCharToMultiByte
Instance Method Summary collapse
- #CopyFile(curr_file, new_file, bail) ⇒ Object
- #CopyFileA(curr_file, new_file, bail) ⇒ Object
- #CopyFileEx(curr_file, new_file, routine, data, cancel, flags) ⇒ Object
- #CopyFileExA(curr_file, new_file, routine, data, cancel, flags) ⇒ Object
- #CopyFileExW(curr_file, new_file, routine, data, cancel, flags) ⇒ Object
- #CopyFileW(curr_file, new_file, bail) ⇒ Object
- #CreateFile(file, access, share, sec, disp, flags, template) ⇒ Object
- #CreateFileA(file, access, share, sec, disp, flags, template) ⇒ Object
- #CreateFileW(file, access, share, sec, disp, flags, template) ⇒ Object
- #CreateHardLink(new_file, old_file, attributes) ⇒ Object
- #CreateHardLinkA(new_file, old_file, attributes) ⇒ Object
- #CreateHardLinkW(new_file, old_file, attributes) ⇒ Object
- #DecryptFile(file, res = 0) ⇒ Object
- #DecryptFileA(file, res = 0) ⇒ Object
- #DecryptFileW(file, res = 0) ⇒ Object
- #DeleteFile(file) ⇒ Object
- #DeleteFileA(file) ⇒ Object
- #DeleteFileW(file) ⇒ Object
- #EncryptFile(file) ⇒ Object
- #EncryptFileA(file) ⇒ Object
- #EncryptFileW(file) ⇒ Object
- #GetBinaryType(file, type) ⇒ Object
- #GetBinaryTypeA(file, type) ⇒ Object
- #GetBinaryTypeW(file, type) ⇒ Object
- #GetFileAttributes(file) ⇒ Object
- #GetFileAttributesA(file) ⇒ Object
- #GetFileAttributesEx(file, level_id, info) ⇒ Object
- #GetFileAttributesExA(file, level_id, info) ⇒ Object
- #GetFileAttributesExW(file, level_id, info) ⇒ Object
- #GetFileAttributesW(file) ⇒ Object
- #GetFileSize(handle, size) ⇒ Object
- #GetFileSizeEx(handle, size) ⇒ Object
- #GetFileType(handle) ⇒ Object
- #GetFullPathName(file, buf, buf_size, part) ⇒ Object
- #GetFullPathNameA(file, buf, buf_size, part) ⇒ Object
- #GetFullPathNameW(file, buf, buf_size, part) ⇒ Object
- #GetLongPathName(short, buf, buf_size) ⇒ Object
- #GetLongPathNameA(short, buf, buf_size) ⇒ Object
- #GetLongPathNameW(short, buf, buf_size) ⇒ Object
- #GetShortPathName(long, buf, buf_size) ⇒ Object
- #GetShortPathNameA(long, buf, buf_size) ⇒ Object
- #GetShortPathNameW(long, buf, buf_size) ⇒ Object
- #LockFile(handle, off_low, off_high, lock_low, lock_high) ⇒ Object
- #LockFileEx(handle, flags, res, low, high, overlapped) ⇒ Object
- #ReadFile(file, buf, bytes, bytes_read, overlapped) ⇒ Object
- #ReadFileEx(file, buf, bytes, overlapped, routine) ⇒ Object
- #SetFileAttributes(file, attributes) ⇒ Object
- #SetFileAttributesA(file, attributes) ⇒ Object
- #SetFileAttributesW(file, attributes) ⇒ Object
- #UnlockFile(handle, off_low, off_high, bytes_low, bytes_high) ⇒ Object
- #UnlockFileEx(handle, res, low, high, overlapped) ⇒ Object
- #WriteFile(handle, buf, bytes, overlapped) ⇒ Object
- #WriteFileEx(handle, buf, bytes, overlapped, routine) ⇒ Object
Methods included from Unicode
#GetTextCharset, #GetTextCharsetInfo, #IsDBCSLeadByte, #IsDBCSLeadByteEx, #IsTextUnicode, #MultiByteToWideChar, #TranslateCharsetInfo, #WideCharToMultiByte, #multi_to_wide, #wide_to_multi
Instance Method Details
#CopyFile(curr_file, new_file, bail) ⇒ Object
234 235 236 |
# File 'lib/windows/file.rb', line 234 def CopyFile(curr_file, new_file, bail) CopyFile.call(curr_file, new_file, bail) > 0 end |
#CopyFileA(curr_file, new_file, bail) ⇒ Object
238 239 240 |
# File 'lib/windows/file.rb', line 238 def CopyFileA(curr_file, new_file, bail) CopyFileA.call(curr_file, new_file, bail) > 0 end |
#CopyFileEx(curr_file, new_file, routine, data, cancel, flags) ⇒ Object
246 247 248 |
# File 'lib/windows/file.rb', line 246 def CopyFileEx(curr_file, new_file, routine, data, cancel, flags) CopyFileEx.call(curr_file, new_file, routine, data, cancel, flags) > 0 end |
#CopyFileExA(curr_file, new_file, routine, data, cancel, flags) ⇒ Object
250 251 252 |
# File 'lib/windows/file.rb', line 250 def CopyFileExA(curr_file, new_file, routine, data, cancel, flags) CopyFileExA.call(curr_file, new_file, routine, data, cancel, flags) > 0 end |
#CopyFileExW(curr_file, new_file, routine, data, cancel, flags) ⇒ Object
254 255 256 |
# File 'lib/windows/file.rb', line 254 def CopyFileExW(curr_file, new_file, routine, data, cancel, flags) CopyFileExW.call(curr_file, new_file, routine, data, cancel, flags) > 0 end |
#CopyFileW(curr_file, new_file, bail) ⇒ Object
242 243 244 |
# File 'lib/windows/file.rb', line 242 def CopyFileW(curr_file, new_file, bail) CopyFileW.call(curr_file, new_file, bail) > 0 end |
#CreateFile(file, access, share, sec, disp, flags, template) ⇒ Object
258 259 260 |
# File 'lib/windows/file.rb', line 258 def CreateFile(file, access, share, sec, disp, flags, template) CreateFile.call(file, access, share, sec, disp, flags, template) end |
#CreateFileA(file, access, share, sec, disp, flags, template) ⇒ Object
262 263 264 |
# File 'lib/windows/file.rb', line 262 def CreateFileA(file, access, share, sec, disp, flags, template) CreateFileA.call(file, access, share, sec, disp, flags, template) end |
#CreateFileW(file, access, share, sec, disp, flags, template) ⇒ Object
266 267 268 |
# File 'lib/windows/file.rb', line 266 def CreateFileW(file, access, share, sec, disp, flags, template) CreateFileW.call(file, access, share, sec, disp, flags, template) end |
#CreateHardLink(new_file, old_file, attributes) ⇒ Object
270 271 272 |
# File 'lib/windows/file.rb', line 270 def CreateHardLink(new_file, old_file, attributes) CreateHardLink.call(new_file, old_file, attributes) > 0 end |
#CreateHardLinkA(new_file, old_file, attributes) ⇒ Object
274 275 276 |
# File 'lib/windows/file.rb', line 274 def CreateHardLinkA(new_file, old_file, attributes) CreateHardLinkA.call(new_file, old_file, attributes) > 0 end |
#CreateHardLinkW(new_file, old_file, attributes) ⇒ Object
278 279 280 |
# File 'lib/windows/file.rb', line 278 def CreateHardLinkW(new_file, old_file, attributes) CreateHardLinkW.call(new_file, old_file, attributes) > 0 end |
#DecryptFile(file, res = 0) ⇒ Object
282 283 284 |
# File 'lib/windows/file.rb', line 282 def DecryptFile(file, res = 0) DecryptFile.call(file, res) end |
#DecryptFileA(file, res = 0) ⇒ Object
286 287 288 |
# File 'lib/windows/file.rb', line 286 def DecryptFileA(file, res = 0) DecryptFileA.call(file, res) end |
#DecryptFileW(file, res = 0) ⇒ Object
290 291 292 |
# File 'lib/windows/file.rb', line 290 def DecryptFileW(file, res = 0) DecryptFileW.call(file, res) end |
#DeleteFile(file) ⇒ Object
294 295 296 |
# File 'lib/windows/file.rb', line 294 def DeleteFile(file) DeleteFile.call(file) > 0 end |
#DeleteFileA(file) ⇒ Object
298 299 300 |
# File 'lib/windows/file.rb', line 298 def DeleteFileA(file) DeleteFileA.call(file) > 0 end |
#DeleteFileW(file) ⇒ Object
302 303 304 |
# File 'lib/windows/file.rb', line 302 def DeleteFileW(file) DeleteFileW.call(file) > 0 end |
#EncryptFile(file) ⇒ Object
306 307 308 |
# File 'lib/windows/file.rb', line 306 def EncryptFile(file) EncryptFile.call(file) > 0 end |
#EncryptFileA(file) ⇒ Object
310 311 312 |
# File 'lib/windows/file.rb', line 310 def EncryptFileA(file) EncryptFileA.call(file) > 0 end |
#EncryptFileW(file) ⇒ Object
314 315 316 |
# File 'lib/windows/file.rb', line 314 def EncryptFileW(file) EncryptFileW.call(file) > 0 end |
#GetBinaryType(file, type) ⇒ Object
318 319 320 |
# File 'lib/windows/file.rb', line 318 def GetBinaryType(file, type) GetBinaryType.call(file, type) > 0 end |
#GetBinaryTypeA(file, type) ⇒ Object
322 323 324 |
# File 'lib/windows/file.rb', line 322 def GetBinaryTypeA(file, type) GetBinaryTypeA.call(file, type) > 0 end |
#GetBinaryTypeW(file, type) ⇒ Object
326 327 328 |
# File 'lib/windows/file.rb', line 326 def GetBinaryTypeW(file, type) GetBinaryTypeW.call(file, type) > 0 end |
#GetFileAttributes(file) ⇒ Object
330 331 332 |
# File 'lib/windows/file.rb', line 330 def GetFileAttributes(file) GetFileAttributes.call(file) end |
#GetFileAttributesA(file) ⇒ Object
334 335 336 |
# File 'lib/windows/file.rb', line 334 def GetFileAttributesA(file) GetFileAttributesA.call(file) end |
#GetFileAttributesEx(file, level_id, info) ⇒ Object
342 343 344 |
# File 'lib/windows/file.rb', line 342 def GetFileAttributesEx(file, level_id, info) GetFileAttributesEx.call(file, level_id, info) end |
#GetFileAttributesExA(file, level_id, info) ⇒ Object
346 347 348 |
# File 'lib/windows/file.rb', line 346 def GetFileAttributesExA(file, level_id, info) GetFileAttributesExA.call(file, level_id, info) end |
#GetFileAttributesExW(file, level_id, info) ⇒ Object
350 351 352 |
# File 'lib/windows/file.rb', line 350 def GetFileAttributesExW(file, level_id, info) GetFileAttributesExW.call(file, level_id, info) end |
#GetFileAttributesW(file) ⇒ Object
338 339 340 |
# File 'lib/windows/file.rb', line 338 def GetFileAttributesW(file) GetFileAttributesW.call(file) end |
#GetFileSize(handle, size) ⇒ Object
354 355 356 |
# File 'lib/windows/file.rb', line 354 def GetFileSize(handle, size) GetFileSize.call(handle, size) end |
#GetFileSizeEx(handle, size) ⇒ Object
358 359 360 |
# File 'lib/windows/file.rb', line 358 def GetFileSizeEx(handle, size) GetFileSizeEx.call(handle, size) > 0 end |
#GetFileType(handle) ⇒ Object
362 363 364 |
# File 'lib/windows/file.rb', line 362 def GetFileType(handle) GetFileType.call(handle) end |
#GetFullPathName(file, buf, buf_size, part) ⇒ Object
366 367 368 |
# File 'lib/windows/file.rb', line 366 def GetFullPathName(file, buf, buf_size, part) GetFullPathName.call(file, buf, buf_size, part) end |
#GetFullPathNameA(file, buf, buf_size, part) ⇒ Object
370 371 372 |
# File 'lib/windows/file.rb', line 370 def GetFullPathNameA(file, buf, buf_size, part) GetFullPathNameA.call(file, buf, buf_size, part) end |
#GetFullPathNameW(file, buf, buf_size, part) ⇒ Object
374 375 376 |
# File 'lib/windows/file.rb', line 374 def GetFullPathNameW(file, buf, buf_size, part) GetFullPathNameW.call(file, buf, buf_size, part) end |
#GetLongPathName(short, buf, buf_size) ⇒ Object
378 379 380 |
# File 'lib/windows/file.rb', line 378 def GetLongPathName(short, buf, buf_size) GetLongPathName.call(short, buf, buf_size) end |
#GetLongPathNameA(short, buf, buf_size) ⇒ Object
382 383 384 |
# File 'lib/windows/file.rb', line 382 def GetLongPathNameA(short, buf, buf_size) GetLongPathNameA.call(short, buf, buf_size) end |
#GetLongPathNameW(short, buf, buf_size) ⇒ Object
386 387 388 |
# File 'lib/windows/file.rb', line 386 def GetLongPathNameW(short, buf, buf_size) GetLongPathNameW.call(short, buf, buf_size) end |
#GetShortPathName(long, buf, buf_size) ⇒ Object
390 391 392 |
# File 'lib/windows/file.rb', line 390 def GetShortPathName(long, buf, buf_size) GetShortPathName.call(long, buf, buf_size) end |
#GetShortPathNameA(long, buf, buf_size) ⇒ Object
394 395 396 |
# File 'lib/windows/file.rb', line 394 def GetShortPathNameA(long, buf, buf_size) GetShortPathNameA.call(long, buf, buf_size) end |
#GetShortPathNameW(long, buf, buf_size) ⇒ Object
398 399 400 |
# File 'lib/windows/file.rb', line 398 def GetShortPathNameW(long, buf, buf_size) GetShortPathNameW.call(long, buf, buf_size) end |
#LockFile(handle, off_low, off_high, lock_low, lock_high) ⇒ Object
402 403 404 |
# File 'lib/windows/file.rb', line 402 def LockFile(handle, off_low, off_high, lock_low, lock_high) LockFile.call(handle, off_low, off_high, lock_low, lock_high) > 0 end |
#LockFileEx(handle, flags, res, low, high, overlapped) ⇒ Object
406 407 408 |
# File 'lib/windows/file.rb', line 406 def LockFileEx(handle, flags, res, low, high, overlapped) LockFileEx.call(handle, flags, res, low, high, overlapped) > 0 end |
#ReadFile(file, buf, bytes, bytes_read, overlapped) ⇒ Object
410 411 412 |
# File 'lib/windows/file.rb', line 410 def ReadFile(file, buf, bytes, bytes_read, overlapped) ReadFile.call(file, buf, bytes, bytes_read, overlapped) > 0 end |
#ReadFileEx(file, buf, bytes, overlapped, routine) ⇒ Object
414 415 416 |
# File 'lib/windows/file.rb', line 414 def ReadFileEx(file, buf, bytes, overlapped, routine) ReadFileEx.call(file, buf, bytes, overlapped, routine) > 0 end |
#SetFileAttributes(file, attributes) ⇒ Object
418 419 420 |
# File 'lib/windows/file.rb', line 418 def SetFileAttributes(file, attributes) SetFileAttributes.call(file, attributes) > 0 end |
#SetFileAttributesA(file, attributes) ⇒ Object
422 423 424 |
# File 'lib/windows/file.rb', line 422 def SetFileAttributesA(file, attributes) SetFileAttributesA.call(file, attributes) > 0 end |
#SetFileAttributesW(file, attributes) ⇒ Object
426 427 428 |
# File 'lib/windows/file.rb', line 426 def SetFileAttributesW(file, attributes) SetFileAttributesW.call(file, attributes) > 0 end |
#UnlockFile(handle, off_low, off_high, bytes_low, bytes_high) ⇒ Object
430 431 432 |
# File 'lib/windows/file.rb', line 430 def UnlockFile(handle, off_low, off_high, bytes_low, bytes_high) UnlockFile.call(handle, off_low, off_high, bytes_low, bytes_high) > 0 end |
#UnlockFileEx(handle, res, low, high, overlapped) ⇒ Object
434 435 436 |
# File 'lib/windows/file.rb', line 434 def UnlockFileEx(handle, res, low, high, overlapped) UnlockFileEx.call(handle, res, low, high, overlapped) > 0 end |
#WriteFile(handle, buf, bytes, overlapped) ⇒ Object
438 439 440 |
# File 'lib/windows/file.rb', line 438 def WriteFile(handle, buf, bytes, overlapped) WriteFile.call(handle, buf, bytes, overlapped) > 0 end |
#WriteFileEx(handle, buf, bytes, overlapped, routine) ⇒ Object
442 443 444 |
# File 'lib/windows/file.rb', line 442 def WriteFileEx(handle, buf, bytes, overlapped, routine) WriteFileEx.call(handle, buf, bytes, overlapped, routine) > 0 end |