Ticket #4149: permissions-type-abstract-2.dpatch

File permissions-type-abstract-2.dpatch, 3.9 KB (added by igloo, 3 years ago)
Line 
11 patch for repository http://darcs.haskell.org/packages/directory:
2
3Mon Aug  2 18:27:59 BST 2010  Ian Lynagh <igloo@earth.li>
4  * Make the permissions type abstract
5
6New patches:
7
8[Make the permissions type abstract
9Ian Lynagh <igloo@earth.li>**20100802172759] {
10hunk ./System/Directory.hs 58
11 
12     -- $permissions
13 
14-    , Permissions(
15-       Permissions,
16-       readable,               -- :: Permissions -> Bool
17-       writable,               -- :: Permissions -> Bool
18-       executable,             -- :: Permissions -> Bool
19-       searchable              -- :: Permissions -> Bool
20-      )
21+    , Permissions
22+    , readable          -- :: Permissions -> Bool
23+    , writable          -- :: Permissions -> Bool
24+    , executable        -- :: Permissions -> Bool
25+    , searchable        -- :: Permissions -> Bool
26+    , setOwnerReadable
27+    , setOwnerWritable
28+    , setOwnerExecutable
29+    , setOwnerSearchable
30 
31     , getPermissions            -- :: FilePath -> IO Permissions
32     , setPermissions           -- :: FilePath -> Permissions -> IO ()
33hunk ./System/Directory.hs 166
34     executable, searchable :: Bool
35    } deriving (Eq, Ord, Read, Show)
36 
37+setOwnerReadable :: Bool -> Permissions -> Permissions
38+setOwnerReadable b p = p { readable = b }
39+
40+setOwnerWritable :: Bool -> Permissions -> Permissions
41+setOwnerWritable b p = p { writable = b }
42+
43+setOwnerExecutable :: Bool -> Permissions -> Permissions
44+setOwnerExecutable b p = p { executable = b }
45+
46+setOwnerSearchable :: Bool -> Permissions -> Permissions
47+setOwnerSearchable b p = p { searchable = b }
48+
49 {- |The 'getPermissions' operation returns the
50 permissions for the file or directory.
51 
52}
53
54Context:
55
56[require base-4.2; the Windows code needs withFilePath (#4147)
57Simon Marlow <marlowsd@gmail.com>**20100623104344
58 Ignore-this: 31b70bc1ad84036a2691e128f489489
59]
60[Check for a NULL result from realpath; fixes #4113 on non-Windows
61Ian Lynagh <igloo@earth.li>**20100613134235]
62[Allow base-4.3
63Simon Marlow <marlowsd@gmail.com>**20100602082444
64 Ignore-this: 44df8988750525c324cab881347c91e9
65]
66[Allow filepath-1.2.*
67Simon Marlow <marlowsd@gmail.com>**20100505101326
68 Ignore-this: cc03e9de58b6576ec9c75e19cbf097f3
69]
70[Bump version number
71Ian Lynagh <igloo@earth.li>**20100227210128]
72[Fix #3878: various directory tests were wrong on Unix systems
73Simon Marlow <marlowsd@gmail.com>**20100226093144
74 Ignore-this: 556184beba98b2ff615254c7fa4f5b2e
75]
76[On Solaris, _FILE_OFFSET_BITS must be defined before including sys/stat.h
77benl@cse.unsw.edu.au**20100203070957]
78[Make it build with nhc98 again.
79Malcolm.Wallace@cs.york.ac.uk**20091124033246
80 Recent changes use System.Posix or System.Win32, neither of which is
81 available to nhc98.
82]
83[Make indentation H'98 compliant.
84Malcolm.Wallace@cs.york.ac.uk**20091123095412]
85[Use H'98-compliant indentation in do-block.
86Malcolm.Wallace@cs.york.ac.uk**20091123090557]
87[Include sys/types.h in HsDirectory.h; fixes trac #3653
88Ian Lynagh <igloo@earth.li>**20091119122951]
89[Update output: filenames in exceptions on Windows
90Ian Lynagh <igloo@earth.li>**20090922001356]
91[Bump version to 1.0.1.0
92Ian Lynagh <igloo@earth.li>**20090920141852]
93[Allow building with base 4.2
94Ian Lynagh <igloo@earth.li>**20090911160728]
95[Export copyPermissions; fixes proposal #3392
96Ian Lynagh <igloo@earth.li>**20090809120637]
97[move Win32 SearchPath and SHGetFolderPath into the Win32 package
98Simon Marlow <marlowsd@gmail.com>**20090629112604
99 Ignore-this: cc7d9b67606e6212a0ceb4d9db106dc7
100   
101 That completes the transition to Unicode FilePath support in the
102 directory package on Win32 (#3300).
103 
104 The main cleanup remaining to do here is to use native Win32
105 implementations of getPermissions/setPermissions/copyPermissions
106 instead of calls to stat().
107 
108 We are very close to being able to remove the last bits of C and
109 autoconf here...
110]
111[add a test for getHomeDirectory et. al.
112Simon Marlow <marlowsd@gmail.com>**20090629110836
113 Ignore-this: 8392a69b7271d9375ed45c5e231ffa60
114]
115[TAG 2009-06-25
116Ian Lynagh <igloo@earth.li>**20090625160218]
117Patch bundle hash:
1187c3820d71480b7fa9cd22b36baf81e3dda11f56b