win32-file-stat 1.3.6 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 21ab123edd8396ff02c8327a373ccfc68e4308c7
4
+ data.tar.gz: fef46107af70e7f8807936e64ae5e6764323998e
5
+ SHA512:
6
+ metadata.gz: 26b1420a147218155fe47a17ea9f427b631b212a56733f27e569c58d838472bc0908d94b9d15defda9be00a7de1ea63faf7356c92901d1755a5652973fd17e6d
7
+ data.tar.gz: 7499482990e1e4a68d52607f612227cf22f11f37ea1a4defb2d62ab6d11fb31b1c0700e2e383989e8d7f4ab57d0df867ca722f4d9b48844fd3daffaad2289cd8
data/CHANGES CHANGED
@@ -1,103 +1,126 @@
1
- == 1.3.6 - 24-Mar-2012
2
- * Eliminated some warnings for Ruby 1.9.3.
3
-
4
- == 1.3.5 - 21-Nov-2011
5
- * Fixed a bug in the dev method for 1.9.x.
6
- * Fixed some method redefinition warnings.
7
- * Refactored the Rakefile and gemspec. The old install task has been
8
- removed from the Rakefile.
9
-
10
- == 1.3.4 - 13-Aug-2009
11
- * Changed license to Artistic 2.0.
12
- * Some gemspec updates, including the addition of a license, an updated
13
- description, and changing test-unit from a runtime dependency to a
14
- development dependency.
15
- * Some documentation updates, mostly to make certain things invisible that
16
- aren't meant for public consumption.
17
- * One test now skipped on 64-bit versions of Windows.
18
-
19
- == 1.3.3 - 9-Feb-2009
20
- * Fixed a bug where File::Stat.new failed on locked files. Thanks go to
21
- Montgomery Kosma for the spot.
22
- * Now requires windows-pr 1.0.0 or later.
23
- * Updated the README to note that 32 bit versions of Ruby which attempt
24
- to access locked system files on 64 bit versions of MS Windows will fail.
25
-
26
- == 1.3.2 - 1-Oct-2008
27
- * Fixed an issue with the private get_blksize method.
28
- * Updated the test suite to use Test::Unit 2.x, which also makes it a
29
- required dependency.
30
- * Removed the pre-generated .txt and .exe files that were used for testing.
31
- These are now generated within the test suite itself.
32
- * Fixed two broken size tests, and now omits one blockdev test if there's no
33
- media in the drive.
34
-
35
- == 1.3.1 - 9-Aug-2008
36
- * Fixed the stat buf to be the proper size (I had too many struct members).
37
- * Modified the tests slightly.
38
-
39
- == 1.3.0 - 1-Aug-2008
40
- * Fixed a couple of function calls where I had forgotten to call an
41
- explicitly wide version.
42
- * No longer ignores failures on empty block devices, e.g. CD-ROM drives
43
- without any media in them. A SystemCallError is raised instead.
44
- * Added blockdev boolean to the inspect/pp output.
45
- * Fixed a potential issue with an internal helper function and the new 'S'
46
- prototype from win32-api 1.2.0 or later.
47
-
48
- == 1.2.8 - 29-Jul-2008
49
- * Internally now always uses wide character functions.
50
- * A private alias was made private.
51
- * Now requires windows-pr 0.9.1 or later.
52
-
53
- == 1.2.7 - 1-Oct-2007
54
- * Changed an error type in a private method in order to maintain
55
- compatibility with the FileUtils module.
56
-
57
- == 1.2.6 - 29-Sep-2007
58
- * Minor tweak to the way I handle redefining the initialize method. The
59
- old_init alias is now removed.
60
- * Now handles a potential failure in getting the atime, ctime and mtime,
61
- caused by the underlying filesystem, e.g. Samba. If it fails, these
62
- fields are set to the epoch. Thanks go an anonymous user for the spot.
63
- * Added a Rakefile that includes tasks for installation and testing.
64
- * Removed the install.rb file. That has been inlined into the Rakefile.
65
-
66
- == 1.2.5 - 5-Apr-2007
67
- * Now runs -w clean.
68
-
69
- == 1.2.4 - 22-Jan-2007
70
- * Improved block device handling.
71
-
72
- == 1.2.3 - 4-Nov-2006
73
- * Bug fix for file sizes over 4gb.
74
-
75
- == 1.2.2 - 13-May-2006
76
- * Yet another blksize bug fix.
77
- * Minor tweak to the pretty_print method with regards to handling nil values.
78
- * Bumped the minimum required windows-pr version to 0.4.0 in the gemspec.
79
-
80
- == 1.2.1 - 12-May-2006
81
- * Fixed a bug with regards to the block count where the constructor would die
82
- with a FloatDomainError if the blksize returned 0 or nil. It now defaults
83
- to nil in that event.
84
-
85
- == 1.2.0 - 23-Apr-2006
86
- * Removed the attribute setters. From now on this class provides readonly
87
- methods. Use the win32-file library for attribute setters.
88
- * Added the content_indexed? alias for the indexed? method.
89
- * Corresponding test suite changes.
90
- * Fixed the pp issue by writing a custom pretty_print method.
91
-
92
- == 1.1.0 - 15-Apr-2006
93
- * Added the chardev?, dev_major, dev_minor directory?, file?, executable?,
94
- executable_real?, ftype, grpowned?, owned?, pipe?, readable?, readable_real?,
95
- rdev_major, rdev_minor, setgid?, setuid?, size?, socket?, sticky?, symlink?,
96
- writable?, writable_real? and zero? methods. Note that not all of these
97
- methods return meaningful values and were merely added to match the current
98
- spec. See documentation for details.
99
- * Added a VERSION constant.
100
- * Some optimization in the constructor.
101
-
102
- == 1.0.0 - 13-Apr-2006
103
- * Initial release
1
+ == 1.4.0 - 16-Dec-2013
2
+ * Conversion to FFI.
3
+ * Now requires Ruby 1.9 or later.
4
+ * The #mode method now more closely matches core MRI.
5
+ * The #executable? method now simply checks the extension name. The Windows
6
+ API method I was using before (GetBinaryType) was limited to .exe files and
7
+ could return false positives. The current version checks for .bat, .cmd,
8
+ .com and .exe.
9
+ * The #dev method returns the volume serial number instead of a drive letter.
10
+ * The #symlink? method was implemented.
11
+ * The #uid method was implemented. It now returns an actual user id. It can
12
+ optionally be passed a boolean argument. If true, it will return the full
13
+ string SID.
14
+ * The #owned? method was implemented.
15
+ * The #gid method was implemented. It now returns an actual group id. It can
16
+ optionally be passed a boolean argument. If true, it will return the full
17
+ string SID.
18
+ * The #grpowned? method was implemented.
19
+ * The #ino method was implemented.
20
+ * Added working implementations of the #readable?, #writable?,
21
+ #world_readable? and #world_writable? methods.
22
+ * The VERSION constant was changed to WIN32_FILE_STAT_VERSION.
23
+
24
+ == 1.3.6 - 24-Mar-2012
25
+ * Eliminated some warnings for Ruby 1.9.3.
26
+
27
+ == 1.3.5 - 21-Nov-2011
28
+ * Fixed a bug in the dev method for 1.9.x.
29
+ * Fixed some method redefinition warnings.
30
+ * Refactored the Rakefile and gemspec. The old install task has been
31
+ removed from the Rakefile.
32
+
33
+ == 1.3.4 - 13-Aug-2009
34
+ * Changed license to Artistic 2.0.
35
+ * Some gemspec updates, including the addition of a license, an updated
36
+ description, and changing test-unit from a runtime dependency to a
37
+ development dependency.
38
+ * Some documentation updates, mostly to make certain things invisible that
39
+ aren't meant for public consumption.
40
+ * One test now skipped on 64-bit versions of Windows.
41
+
42
+ == 1.3.3 - 9-Feb-2009
43
+ * Fixed a bug where File::Stat.new failed on locked files. Thanks go to
44
+ Montgomery Kosma for the spot.
45
+ * Now requires windows-pr 1.0.0 or later.
46
+ * Updated the README to note that 32 bit versions of Ruby which attempt
47
+ to access locked system files on 64 bit versions of MS Windows will fail.
48
+
49
+ == 1.3.2 - 1-Oct-2008
50
+ * Fixed an issue with the private get_blksize method.
51
+ * Updated the test suite to use Test::Unit 2.x, which also makes it a
52
+ required dependency.
53
+ * Removed the pre-generated .txt and .exe files that were used for testing.
54
+ These are now generated within the test suite itself.
55
+ * Fixed two broken size tests, and now omits one blockdev test if there's no
56
+ media in the drive.
57
+
58
+ == 1.3.1 - 9-Aug-2008
59
+ * Fixed the stat buf to be the proper size (I had too many struct members).
60
+ * Modified the tests slightly.
61
+
62
+ == 1.3.0 - 1-Aug-2008
63
+ * Fixed a couple of function calls where I had forgotten to call an
64
+ explicitly wide version.
65
+ * No longer ignores failures on empty block devices, e.g. CD-ROM drives
66
+ without any media in them. A SystemCallError is raised instead.
67
+ * Added blockdev boolean to the inspect/pp output.
68
+ * Fixed a potential issue with an internal helper function and the new 'S'
69
+ prototype from win32-api 1.2.0 or later.
70
+
71
+ == 1.2.8 - 29-Jul-2008
72
+ * Internally now always uses wide character functions.
73
+ * A private alias was made private.
74
+ * Now requires windows-pr 0.9.1 or later.
75
+
76
+ == 1.2.7 - 1-Oct-2007
77
+ * Changed an error type in a private method in order to maintain
78
+ compatibility with the FileUtils module.
79
+
80
+ == 1.2.6 - 29-Sep-2007
81
+ * Minor tweak to the way I handle redefining the initialize method. The
82
+ old_init alias is now removed.
83
+ * Now handles a potential failure in getting the atime, ctime and mtime,
84
+ caused by the underlying filesystem, e.g. Samba. If it fails, these
85
+ fields are set to the epoch. Thanks go an anonymous user for the spot.
86
+ * Added a Rakefile that includes tasks for installation and testing.
87
+ * Removed the install.rb file. That has been inlined into the Rakefile.
88
+
89
+ == 1.2.5 - 5-Apr-2007
90
+ * Now runs -w clean.
91
+
92
+ == 1.2.4 - 22-Jan-2007
93
+ * Improved block device handling.
94
+
95
+ == 1.2.3 - 4-Nov-2006
96
+ * Bug fix for file sizes over 4gb.
97
+
98
+ == 1.2.2 - 13-May-2006
99
+ * Yet another blksize bug fix.
100
+ * Minor tweak to the pretty_print method with regards to handling nil values.
101
+ * Bumped the minimum required windows-pr version to 0.4.0 in the gemspec.
102
+
103
+ == 1.2.1 - 12-May-2006
104
+ * Fixed a bug with regards to the block count where the constructor would die
105
+ with a FloatDomainError if the blksize returned 0 or nil. It now defaults
106
+ to nil in that event.
107
+
108
+ == 1.2.0 - 23-Apr-2006
109
+ * Removed the attribute setters. From now on this class provides readonly
110
+ methods. Use the win32-file library for attribute setters.
111
+ * Added the content_indexed? alias for the indexed? method.
112
+ * Corresponding test suite changes.
113
+ * Fixed the pp issue by writing a custom pretty_print method.
114
+
115
+ == 1.1.0 - 15-Apr-2006
116
+ * Added the chardev?, dev_major, dev_minor directory?, file?, executable?,
117
+ executable_real?, ftype, grpowned?, owned?, pipe?, readable?, readable_real?,
118
+ rdev_major, rdev_minor, setgid?, setuid?, size?, socket?, sticky?, symlink?,
119
+ writable?, writable_real? and zero? methods. Note that not all of these
120
+ methods return meaningful values and were merely added to match the current
121
+ spec. See documentation for details.
122
+ * Added a VERSION constant.
123
+ * Some optimization in the constructor.
124
+
125
+ == 1.0.0 - 13-Apr-2006
126
+ * Initial release
data/MANIFEST CHANGED
@@ -1,7 +1,10 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
4
- * Rakefile
5
- * win32-file-stat.gemspec
6
- * lib/win32/file/stat.rb
7
- * test/test_file_stat.rb
1
+ * CHANGES
2
+ * README
3
+ * MANIFEST
4
+ * Rakefile
5
+ * win32-file-stat.gemspec
6
+ * lib/win32/file/stat.rb
7
+ * lib/win32/file/windows/constants.rb
8
+ * lib/win32/file/windows/functions.rb
9
+ * lib/win32/file/windows/structs.rb
10
+ * test/test_file_stat.rb
data/README CHANGED
@@ -1,84 +1,85 @@
1
- == Description
2
- A redefinition of the File::Stat class for MS Windows.
3
-
4
- == Prerequisites
5
- * windows-pr 0.9.1 or later.
6
-
7
- == Installation
8
- === Remote Installation
9
- gem install win32-file-stat
10
-
11
- === Local Installation
12
- rake install
13
-
14
- == Synopsis
15
- # Don't 'require' like this in practice - see 'Known Issues' below
16
- require 'win32/file/stat'
17
-
18
- stat = File::Stat.new('file.txt')
19
- stat.size
20
- stat.readonly?
21
- stat.hidden?
22
-
23
- == Differences between Ruby's File::Stat and this version:
24
- * The File::Stat#blksize method returns a meaningful value.
25
- * The File::Stat#blockdev method works more accurately.
26
- * The File::Stat#blocks method returns a meaningful value.
27
- * The File::Stat#dev method returns a drive letter, not a number.
28
- * The File::Stat#executable? method works properly.
29
- * The File::Stat#executable_real? returns the same value as
30
- File::Stat#executable? (which now works properly).
31
- * The File::Stat#file? method works properly.
32
- * The File::Stat#ftype method works more accurately.
33
- * The File::Stat#pipe method works properly.
34
- * The File::Stat#size method handles file sizes greater than 2 gigabytes
35
- correctly.
36
- * The File::Stat#socket method works more accurately.
37
- * Allows you to get file attributes specific to MS Windows, e.g. archive,
38
- hidden, etc.
39
- * The inspect and pretty print output has been customized.
40
-
41
- == Known issues
42
- You should not require 'win32/file/stat' directly. Instead, require the
43
- win32-file library which will, in turn, require win32-file-stat. This is
44
- the preferred approach because some modules (i.e. 'find') use the pass-through
45
- methods of the File class, such as File.lstat. Many of the pass through
46
- methods have been redefined in the win32-file library to work in conjunction
47
- with the custom File::Stat objects created by this library.
48
-
49
- Failure to follow these instructions could lead to cases where the core Ruby
50
- File class attempts to use the custom File::Stat object defined in this class,
51
- and that will likely cause problems.
52
-
53
- Also, a 32 bit Ruby attempting to access a locked system file on a 64 bit
54
- version of MS Windows will fail.
55
-
56
- == Known bugs
57
- None that I'm aware of beyond the Known Issues listed above. Please report any
58
- bugs you find on the project page at:
59
-
60
- http://www.rubyforge.org/projects/win32utils.
61
-
62
- == Miscellaneous
63
- I had to require 'pp' explicitly in order to deal with the fact that pp.rb
64
- has a builtin pretty_print method for File::Stat. If I didn't do this
65
- you would end up using the pretty_print in pp.rb, which would break.
66
-
67
- == Future Plans
68
- This library will eventually be merged with the win32-file library. It will
69
- also be refactored to use FindFirstFile().
70
-
71
- == Copyright
72
- (C) 2003-2012, Daniel J. Berger, All Rights Reserved.
73
-
74
- == License
75
- Artistic 2.0
76
-
77
- = Warranty
78
- This library is provided "as is" and without any express or
79
- implied warranties, including, without limitation, the implied
80
- warranties of merchantability and fitness for a particular purpose.
81
-
82
- = Authors
83
- Daniel J. Berger
84
- Park Heesob
1
+ == Description
2
+ A redefinition of the File::Stat class for MS Windows.
3
+
4
+ == Prerequisites
5
+ * ffi
6
+ * Ruby 1.9 or later
7
+
8
+ == Installation
9
+ gem install win32-file-stat
10
+
11
+ == Synopsis
12
+ # require 'win32/file/stat' # Unwise. See below.
13
+ require 'win32/file' # Preferred. See below.
14
+
15
+ stat = File::Stat.new('file.txt')
16
+ p stat.size
17
+ p stat.readonly?
18
+ p stat.hidden?
19
+ p stat.uid
20
+
21
+ == Differences between Ruby's File::Stat and this version:
22
+ * The File::Stat#blksize method returns a meaningful value.
23
+ * The File::Stat#blockdev method works more accurately.
24
+ * The File::Stat#blocks method returns a meaningful value.
25
+ * The File::Stat#executable? method works properly.
26
+ * The File::Stat#executable_real? is an alias for File::Stat#executable?
27
+ * The File::Stat#file? method works properly.
28
+ * The File::Stat#ftype method works more accurately.
29
+ * The File::Stat#pipe method works properly.
30
+ * The File::Stat#socket method works more accurately.
31
+ * The File::Stat#ino method now returns a file identifier.
32
+ * The File::Stat#symlink? method works properly.
33
+ * The File::Stat#uid method returns a meaningful value.
34
+ * The File::Stat#gid method returns a meaningful value.
35
+ * The File::Stat#owned? method now works properly.
36
+ * The File::Stat#grpowned? method now works properly.
37
+ * The File::Stat#rdev method returns the volume serial number.
38
+ * The inspect and pretty print output has been customized.
39
+
40
+ == Changes between this version and the previous versions.
41
+ * The File::Stat#dev method has reverted to returning a drive number by
42
+ default. However, you can pass an optional boolean argument to make it
43
+ return the drive letter instead.
44
+
45
+ == Known issues
46
+ You should not require 'win32/file/stat' directly. Instead, require the
47
+ win32-file library which will, in turn, require win32-file-stat. This is
48
+ the preferred approach because some modules (i.e. 'find') use the pass-through
49
+ methods of the File class, such as File.lstat. Many of the pass through
50
+ methods have been redefined in the win32-file library to work in conjunction
51
+ with the custom File::Stat objects created by this library.
52
+
53
+ Failure to follow these instructions could lead to cases where the core Ruby
54
+ File class attempts to use the custom File::Stat object defined in this class,
55
+ and that will likely cause problems.
56
+
57
+ If run in verbose mode you will see a warning about initialize being
58
+ redefined. I can do nothing about that since my old trick of aliasing and
59
+ undefining initialize now causes a warning as well!
60
+
61
+ == Known bugs
62
+ None that I'm aware of beyond the "Known Issues" listed above. Please report
63
+ any bugs you find on the project page at:
64
+
65
+ http://www.github.com/djberg96/win32-file-stat
66
+
67
+ == Miscellaneous
68
+ I had to require 'pp' explicitly in order to deal with the fact that pp.rb
69
+ has a builtin pretty_print method for File::Stat. If I didn't do this
70
+ you would end up using the pretty_print in pp.rb, which would break.
71
+
72
+ == Copyright
73
+ (C) 2003-2013, Daniel J. Berger, All Rights Reserved.
74
+
75
+ == License
76
+ Artistic 2.0
77
+
78
+ = Warranty
79
+ This library is provided "as is" and without any express or
80
+ implied warranties, including, without limitation, the implied
81
+ warranties of merchantability and fitness for a particular purpose.
82
+
83
+ = Authors
84
+ Daniel J. Berger
85
+ Park Heesob
data/Rakefile CHANGED
@@ -1,26 +1,31 @@
1
- require 'rake'
2
- require 'rake/clean'
3
- require 'rake/testtask'
4
-
5
- CLEAN.include("**/*.gem", "**/*.rbx", "**/*.rbc")
6
-
7
- namespace :gem do
8
- desc "Create the win32-file-stat gem"
9
- task :create => [:clean] do
10
- spec = eval(IO.read("win32-file-stat.gemspec"))
11
- Gem::Builder.new(spec).build
12
- end
13
-
14
- desc "Install the win32-file-stat gem"
15
- task :install => [:create] do
16
- file = Dir["win32-file-stat*.gem"].first
17
- sh "gem install #{file}"
18
- end
19
- end
20
-
21
- Rake::TestTask.new do |t|
22
- t.verbose = true
23
- t.warning = true
24
- end
25
-
26
- task :default => :test
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+
5
+ CLEAN.include("**/*.gem", "**/*.rbx", "**/*.rbc", "**/*.log", "**/*.exe", "**/*.txt")
6
+
7
+ namespace :gem do
8
+ desc "Create the win32-file-stat gem"
9
+ task :create => [:clean] do
10
+ spec = eval(IO.read("win32-file-stat.gemspec"))
11
+ if Gem::VERSION < "2.0.0"
12
+ Gem::Builder.new(spec).build
13
+ else
14
+ require 'rubygems/package'
15
+ Gem::Package.build(spec)
16
+ end
17
+ end
18
+
19
+ desc "Install the win32-file-stat gem"
20
+ task :install => [:create] do
21
+ file = Dir["win32-file-stat*.gem"].first
22
+ sh "gem install #{file}"
23
+ end
24
+ end
25
+
26
+ Rake::TestTask.new do |t|
27
+ t.verbose = true
28
+ t.warning = true
29
+ end
30
+
31
+ task :default => :test