Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!news.sprintlink.net!in1.uu.net!world!mv!usenet
From: rapp@lmr.com (L. M. Rappaport)
Subject: Re: File Handling Question...
Message-ID: <DFD5EH.ME9@mv.mv.com>
Nntp-Posting-Host: lmr.com
Sender: usenet@mv.mv.com (Paul Hurley)
Organization: L. M. Rappaport & Associates, Inc.
Date: Sat, 23 Sep 1995 18:01:37 GMT
References: <mortonr.3.000B13D1@crl.aecl.ca>
X-Newsreader: Forte Agent .99b.112
Lines: 31

mortonr@crl.aecl.ca wrote (with possible editing):

>  I'm trying to determine how one goes about determining whether
>a given file, represented by a string object such as 
>'c:\temp\blah.txt', is read only or not.  It sounds like it should
>be simple, but a search of the class hierarchy revealed nothing
>obvious.  I'm using Digitalk Smalltalk/V v2.0.  Any ideas?

I'm a beginner like yourself, and it is easy in VS, but there doesn't
appear to be an instance method in File.  What you might do is to look
at #getDate and use its structure to examine file attributes.  File
attributes are stored in a single byte at offset 0Bh in the directory
entry.  (the date is stored at offset 18h).   The meaning of the byte
is:

	Bit   	Meaning if set
	0	Read Only
 	1	Hidden
	2	System
	3	Volume Label
	4	Subdirectory
	5	Archive	

I believe 6 and 7 are still unused.

Hope that helps,

Larry
-- 
  

