PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Identifying the attributes of a directory
  • Modifying the attributes of a directory (syntax 2)
  • Managing the errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
fDirAttribute (Function)
In french: fRepAttribut
Returns or modifies the attributes of a directory.
Android In this version, you can only find out the attributes of a directory.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
Windows Mobile
// Retrieve the attributes of a directory
ResAttribute = fDirAttribute("\MyDirectories")
IF ResAttribute <> "ERR" THEN
...
END
Syntax

Retrieving the attributes of a directory Hide the details

<Result> = fDirAttribute(<Directory path>)
<Result>: Character string
  • "ERR" if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
  • One or more letters corresponding to the attributes of the directory ("AH" for example).
    The following letters are used:
    • R: Read-only directory. The directory can be accessed in read-only.
    • H: Hidden directory. The name of the directory is grayed or not visible in the explorer.
    • S: System directory. The directory is a system directory of Windows.
      AndroidAndroid Widget This value is not supported.
    • A: "Archive" directory. This attribute indicates that the directory can be archived. Some programs use this attribute to find out which directories have been saved.
      AndroidAndroid Widget iPhone/iPad This value is not supported.
    • D: Directory or sub-directory. The directory is a directory or a sub-directory.
    • C: Compressed directory (on NTFS partitions). The directory was automatically compressed when it was copied onto an NTFS partition (Windows NT or 2000).
      AndroidAndroid Widget This value is not supported.
<Directory path>: Character string (with quotes)
Name and full (or relative) path of directory (up to 260 characters). A UNC path can be used. This directory name may (or may not) end with "\".
Versions 15 and later
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
New in version 15
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
Versions 17 and later
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories.
New in version 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories.
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
iPhone/iPadWindows Mobile

Modifying the attributes of a directory Hide the details

<Result> = fDirAttribute(<Directory path> , <Directory attributes>)
<Result>: Character string
  • "ERR" if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
  • One or more letters corresponding to the new attributes of directory ("AH" for example),
    The following letters are used:
    • R: Read-only directory. The directory can be accessed in read-only.
    • H: Hidden directory. The name of the directory is grayed or not visible in the explorer.
    • S: System directory. The directory is a system directory of Windows.
    • A: "Archive" directory. This attribute indicates that the directory can be archived. Some programs use this attribute to find out which directories have been saved.
    • D: Directory or sub-directory. The directory is a directory or a sub-directory.
    • C: Compressed directory (on NTFS partitions). The directory was automatically compressed when it was copied onto an NTFS partition (Windows NT or 2000).
<Directory path>: Character string (with quotes)
Name and full (or relative) path of directory (up to 260 characters). A UNC path can be used. This directory name may (or may not) end with "\".
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 17 and later
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories.
New in version 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories.
<Directory attributes>: Character string (with quotes)
One or more letters corresponding to the new attributes of specified directory ("AH" for example). The order of the letters has no importance. The following letters are used:
  • R: Read-only directory. The directory can be accessed in read-only.
  • H: Hidden directory. The name of the directory is grayed or not visible in the explorer.
  • S: System directory. The directory is a system directory of Windows.
  • To: "Archive" directory. This attribute indicates that the directory can be archived. Some programs use this attribute to find out which directories have been saved.
Remarks

Identifying the attributes of a directory

To find out the different attributes of a directory, check whether one of the letters identifying an attribute is found in <Result>. This search can be performed by Position for example.
Windows MobileStored procedures

Modifying the attributes of a directory (syntax 2)

After modification, the attributes of the directory correspond to the attributes specified by fDirAttribute. For example, if <Directory attributes> is set to "AR", the specified directory will become a read-only archive directory.
Special cases:
  • Modifying directory or a sub-directory: The "Directory or sub-directory" attribute (letter D) cannot be modified. Regardless of the modification performed, the directory (or the sub-directory) will keep the "Directory and sub-directory" attribute (letter D).
  • Modifying a compressed directory (on the NTFS partitions): The "Compressed directory" attribute (letter C) cannot be modified. Regardless of the modification performed, the compressed directory will keep the "Compressed directory" attribute (letter C).

Managing the errors

fDirAttribute generates an error in the following cases:
  • the specified directory does not exist,
  • the name of the directory is invalid,
  • the directory is locked by another application (only when attributes are modified),
  • the letters specified in <Directory attributes> do not correspond to directory attributes.
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment