swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

vfs.describe-file

 
 

Library: File system utilities (OMVFS)
Import: omvfs.xmd

Declaration

export external function describe-file
                value      file   file-ref
        into    write-only string attributes

Argument definitions

file-ref
The vfs.file object to query.
attributes
A string or stream shelf of variable size into which the attributes will be written.


Purpose

You can use vfs.describe-file to access the attributes of a file that has been opened using vfs.open. vfs.describe-file behaves the same way as vfs.describe except that:

The following program outputs a description of a file. See vfs.describe for details.

  import "omvfs.xmd" prefixed by vfs.
  
  process
     local string attr variable
     local vfs.file bar-file
  
     set bar-file to vfs.open "c:\foo\bar\bar.txt"
     vfs.describe-file bar-file into attr
  
     repeat over attr
        output key of attr || ": " || attr || "%n"
     again
  
     output "User write permission: "
     do when attr{"permissions"} mask vfs.permit-user-write > 0
        output "YES%n"
     else
        output "NO%n"
     done

Exceptions

The following exceptions may occur:

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.