On Fri, 2002-01-25 at 12:47, Peter Janes wrote:
> As a simple example, take something like
> 
> <set-permissions
>    file="foo"
>    executable="true"
>    readonly="true"
>    hidden="true"
> />
> 
> On Windows (which doesn't have "executable" files) this would translate to
> 
>    attrib +r +h foo
> 
> On UNIX (which doesn't have "hidden" files) it would become
> 
>    chmod 0555 foo
> 

This is fine if you want all user to have the same permissions.

But you would be losing most of the current chmod's capabilities. Keep
in mind that you have the following choices

ugoa (user, group, other, all)
+-=  (add, remove, only)
rwxXstugo  (r) read 
           (w) write
           (x) execute (or access for directo�ries)
           (X) execute only if the file is a directory or already has      
execute permission for some user
           (s) set user or group ID on execution
           (t) sticky
           (u) the permissions that the user who owns the file currently        
   
has for it
           (g) the permissions that other users in the file's group have        
   
for it 
           (o) and the permissions that other users not in the file's      
group have for it


That is allot of combinations to handle gracefully.

With the chmod task for Unix & the Attrib task for Windows I can make a
file read-only for both platforms with the following

<chmod file="${src}/file.java" perm="-w"/>
<attrib file="${src}/file.java" perm="+R"/>

Each task is only executed on the appropriate platform.

-- 
 Jesse Stockall                 |       Tel: 1+ 613.599.2441 ext. 243
 CRYPTOCard Corporation         |       Fax: 1+ 613.599.2442            
 Suite 304, 300 March Rd.       |       email: [EMAIL PROTECTED]
 Ottawa, ON, Canada K2K 2E2     |       web: www.cryptocard.com 
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to