+Thu Feb 26 19:26:14 EST 2004
+jcifs-0.8.1 released
+
+The decision to exclude ATTR_HIDDEN files in generic list operations has
+been revoked. All list methods now include all files unless specifically
+filtered.
+
+The following bugs have been fixed:
+
+ o Previously querying the last modified time or file size immediately
+ following a SmbFileOutputStream.write call returned old
+ information.
+ o The createNewFile method did not use the correct open mode.
+ o The setLastModified method set the create time to an invalid value.
+
Tue Feb 10 23:44:45 EST 2004
jcifs-0.8.0 released
+Thu Feb 26 19:26:14 EST 2004
+jcifs-0.8.1 released
+
+Hidden files are included in all list operations unless specifically
+filtered. A attribute caching bug, createNewFile open mode bug, and time
+setting method bugs have been fixed.
+
+Tue Feb 10 23:44:45 EST 2004
+jcifs-0.8.0 released
+
+This completes the 0.8 beta cycle. There is no technical difference between
+this release and 0.8.0b1.
Tue Feb 10 23:44:45 EST 2004
jcifs-0.8.0 released
<target name="jar" depends="smb">
<copy file="src/jcifs/util/mime.map" tofile="build/jcifs/util/mime.map" overwrite="yes"/>
<copy file="src/jcifs/http/ne.css" tofile="build/jcifs/http/ne.css" overwrite="yes"/>
- <jar jarfile="jcifs-0.8.0.jar" basedir="build"/>
+ <jar jarfile="jcifs-0.8.1.jar" basedir="build"/>
</target>
<target name="tgz">
- <copy todir="dist_tmp/jcifs_0.8.0">
+ <copy todir="dist_tmp/jcifs_0.8.1">
<fileset dir="." excludes="ant,**/.*,build,jcifs.prp,**/*.tgz,**/*.zip"/>
</copy>
- <tar tarfile="jcifs-0.8.0.tar" basedir="dist_tmp"/>
- <gzip src="jcifs-0.8.0.tar" zipfile="jcifs-0.8.0.tgz"/>
- <delete file="jcifs-0.8.0.tar"/>
+ <tar tarfile="jcifs-0.8.1.tar" basedir="dist_tmp"/>
+ <gzip src="jcifs-0.8.1.tar" zipfile="jcifs-0.8.1.tgz"/>
+ <delete file="jcifs-0.8.1.tar"/>
<delete dir="dist_tmp"/>
</target>
<target name="zip">
- <copy todir="dist_tmp/jcifs_0.8.0">
+ <copy todir="dist_tmp/jcifs_0.8.1">
<fileset dir="." excludes="ant,**/.*,build,jcifs.prp,**/*.tgz,**/*.zip"/>
</copy>
<fixcrlf srcdir="dist_tmp" cr="add" tab="remove" tablength="4" excludes="**/*.jar,**/*.exe"/>
- <zip zipfile="jcifs-0.8.0.zip" basedir="dist_tmp"/>
+ <zip zipfile="jcifs-0.8.1.zip" basedir="dist_tmp"/>
<delete dir="dist_tmp"/>
</target>
public static void main( String argv[] ) throws Exception {
SmbFile f = new SmbFile( argv[0] );
- System.out.println( f.length() + " bytes" );
if( f.exists() ) {
System.out.println( argv[0] + " exists" );
} else {
System.out.println( " getParent: " + f.getParent() );
break;
case 15:
- System.out.println( " lastModified: " + sdf.format( new Date( f.lastModified() )));
+ System.out.println( " lastModified: " + + f.lastModified() + ": " + sdf.format( new Date( f.lastModified() )));
break;
case 16:
System.out.println( "getDiskFreeSpace: " + f.getDiskFreeSpace() );
case 22:
System.out.println( " canWrite: " + f.canWrite() );
break;
+ case 23:
+ System.out.println( " createTime: " + + f.createTime() + ": " + sdf.format( new Date( f.createTime() )));
+ break;
}
i++;
- if( i == 23 ) {
+ if( i == 24 ) {
i = 0;
}
} while( i != end );
}
static void writeTime( long t, byte[] dst, int dstIndex ) {
- synchronized( TZ ) {
- if( TZ.inDaylightTime( new Date() )) {
- // in DST
- if( TZ.inDaylightTime( new Date( t ))) {
- // t also in DST so no correction
- } else {
- // t not in DST so subtract 1 hour
- t -= 3600000;
- }
- } else {
- // not in DST
- if( TZ.inDaylightTime( new Date( t ))) {
- // t is in DST so add 1 hour
- t += 3600000;
+ if( t != 0L ) {
+ synchronized( TZ ) {
+ if( TZ.inDaylightTime( new Date() )) {
+ // in DST
+ if( TZ.inDaylightTime( new Date( t ))) {
+ // t also in DST so no correction
+ } else {
+ // t not in DST so subtract 1 hour
+ t -= 3600000;
+ }
} else {
- // t isn't in DST either
+ // not in DST
+ if( TZ.inDaylightTime( new Date( t ))) {
+ // t is in DST so add 1 hour
+ t += 3600000;
+ } else {
+ // t isn't in DST either
+ }
}
}
- }
- t = (t + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L;
+ t = (t + MILLISECONDS_BETWEEN_1970_AND_1601) * 10000L;
+ }
writeLong( t, dst, dstIndex );
}
SmbComBlankResponse blank_resp = new SmbComBlankResponse();
DfsReferral dfsReferral = null; // Only used by getDfsPath()
-
/**
* Constructs an SmbFile representing a resource on an SMB network such as
* a file or directory. See the description and examples of smb URLs above.
try {
if( url.getHost().length() == 0 ) {
} else if( share == null ) {
- if( type == TYPE_WORKGROUP ) {
+ if( getType() == TYPE_WORKGROUP ) {
UniAddress.getByName( url.getHost(), true );
} else {
UniAddress.getByName( url.getHost() ).getHostName();
*/
public String[] list() throws SmbException {
- return list( "*", ATTR_DIRECTORY | ATTR_SYSTEM, null, null );
+ return list( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, null );
}
public String[] list( SmbFilenameFilter filter ) throws SmbException {
- return list( "*", ATTR_DIRECTORY | ATTR_SYSTEM, filter, null );
+ return list( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, filter, null );
}
/**
*/
public SmbFile[] listFiles() throws SmbException {
- return listFiles( "*", ATTR_DIRECTORY | ATTR_SYSTEM, null, null );
+ return listFiles( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, null );
}
/**
*/
public SmbFile[] listFiles( String wildcard ) throws SmbException {
- return listFiles( wildcard, ATTR_DIRECTORY | ATTR_SYSTEM, null, null );
+ return listFiles( wildcard, ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, null );
}
public SmbFile[] listFiles( SmbFilenameFilter filter ) throws SmbException {
- return listFiles( "*", ATTR_DIRECTORY | ATTR_SYSTEM, filter, null );
+ return listFiles( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, filter, null );
}
public SmbFile[] listFiles( SmbFileFilter filter ) throws SmbException {
- return listFiles( "*", ATTR_DIRECTORY | ATTR_SYSTEM, null, filter );
+ return listFiles( "*", ATTR_DIRECTORY | ATTR_HIDDEN | ATTR_SYSTEM, null, filter );
}
String[] list( String wildcard, int searchAttributes,
SmbFilenameFilter fnf, SmbFileFilter ff ) throws SmbException {
throw new SmbException( SmbException.ERRDOS,
SmbException.ERRnoaccess );
}
- close( open0( O_RDWR | O_EXCL, ATTR_NORMAL, 0 ), 0L );
+ close( open0( O_RDWR | O_CREAT | O_EXCL, ATTR_NORMAL, 0 ), 0L );
}
void setPathInformation( int attrs, long ctime, long mtime ) throws SmbException {
file.send( req, rsp );\r
}\r
} while( len > 0 );\r
+\r
+ file.attrExpiration = file.sizeExpiration = 0L;\r
}\r
}\r