Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_fattrset(<cfilespec>, http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_FATTRSET(<cFileSpec>, 
           <cAttribute1>|<nAttribute1> [,<Setting1>
         [,<cAttribute2>|<nAttribute2>,<Setting2>...]])
-- or --
N_FATTRSET(<cFileSpec>,<aAttribute>,<aSetting>)


Parameters

<cFileSpec>
Name of the file.

<cAttribute>
<nAttribute>
Attribute to set. May be passed as a text string or as a numeric value. 
See the table below for a list of attributes that may be set.

<Setting>
Value to which the attribute should be set. 

<aAttribute>
An array containing the names or numbers of the attributes you wish to 
set. This is an alternative to passing a series of <Attribute>, 
<Setting> pairs.

<aSetting>
An array of values for the attributes listed in the corresponding array 
<aAttribute>.

The number of elements in <aSetting> must be equal to the number of 
elements in <aAttribute>, or attributes may be set to unintended 
values.


Returns

Zero if all attributes passed to the function were set. Otherwise,
the function returns a number corresponding to the position in the
argument list of the first item that caused the failure.

For example, if you attempt to set only one attribute and pass an
incorrect attribute name, the function will return 2. This indicates
that the second argument caused the failure. On the other hand, if
the attribute name is incorrect but the setting is invalid, the function
will return 3, indicating that the third argument caused the failure.


Description

Sets the attributes of the specified file to the indicated values. You 
can include as many attribute/value pairs as needed. Setting multiple 
attributes in a single call is more efficient than repeated calls to 
N_FATTRSET().

Attributes may be specified by name or number. An attribute name can be 
abbreviated to as few as three characters. Attribute numbers are 
defined as manifest constants in FATTR.CH. Using constants or their 
literals will give slightly better performance than using names.

The attributes listed below may be changed if the user logged in at the 
current station has Modify right for the directory. Each accepts a 
logical value. True (.T.) sets the attribute On. False (.F.) sets it 
Off.

Text          #define          Description
ARCHIVE       FA_ARCHIVE       Archive needed.
                               Automatically 
                               turned on by
                               NetWare when a file
                               is modified or 
                               created.

HIDDEN        FA_HIDDEN        Hidden from DIR 
                               scans, as well as 
                               DOS COPY and
                               DELETE, ERASE, and 
                               RENAME. Will appear 
                               in an NDIR scan if 
                               the user has the 
                               File Scan right.

READONLY      FA_READONLY      File cannot be 
                               modified.

SYSTEM        FA_SYSTEM        System file. Hidden 
                               from DIR listing. 
                               Cannot be deleted 
                               or copied using DOS 
                               commands.

 The following attributes apply only to Novell:

EXECUTE       FA_EXECUTE       Execute only. 
                               Cannot be copied, 
                               may not be backed 
                               up. Once set on, 
                               the attribute 
                               cannot be turned 
                               off. It is a good 
                               idea to make a
                               duplicate copy 
                               before setting this 
                               attribute on.  This 
                               attribute is not 
                               respected by all
                               network operating 
                               systems.

SHAREABLE     FA_SHAREABLE     Several users can 
                               access 
                               simultaneously.
                               Affected by the 
                               FLAG console 
                               command. Ignored by 
                               Clipper programs 
                               but may be
                               required by others. 
                               Files to be 
                               recovered by TTS 
                               must be marked as 
                               both transactional
                               and shareable.

TRANSACTION   FA_TRANSACTION   A file must be 
                               marked as a 
                               transactional file
                               for it to be 
                               tracked and 
                               recovered by 
                               Novell's TTS.

INDEXING      FA_INDEXING      A Novell attribute 
                               used to speed up 
                               the access of very 
                               large files (10 MB 
                               and up). It has no
                               relation to a 
                               database index 
                               file. Not used by 
                               NetWare 3.11 and 
                               higher.


Example

#include 'FATTR.CH'
.
.
.
// Make Customer.dbf Shareable, Transactional
N_FATTRSET('Customer.dbf',     ;
           FA_SHAREABLE, .T.   ;
           FA_TRANSACTION, .T. )


Files

FATTR.CH



See Also: N_FATTRGET() N_RIGHTS()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson