/** * Set the attributes of this file. Attributes are composed into a * bitset by bitwise ORing the <tt>ATTR_*</tt> constants. Setting the * value returned by <tt>getAttributes</tt> will result in both files * having the same attributes. * @throws SmbException */ public void setAttributes( int attrs ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( attrs & ATTR_SET_MASK, 0L, 0L ); }
/** * Set the attributes of this file. Attributes are composed into a * bitset by bitwise ORing the <tt>ATTR_*</tt> constants. Setting the * value returned by <tt>getAttributes</tt> will result in both files * having the same attributes. * @throws SmbException */ public void setAttributes( int attrs ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( attrs & ATTR_SET_MASK, 0L, 0L ); }
/** * Set the attributes of this file. Attributes are composed into a * bitset by bitwise ORing the <tt>ATTR_*</tt> constants. Setting the * value returned by <tt>getAttributes</tt> will result in both files * having the same attributes. * @throws SmbException */ public void setAttributes( int attrs ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( attrs & ATTR_SET_MASK, 0L, 0L ); }
/** * Set the attributes of this file. Attributes are composed into a * bitset by bitwise ORing the <tt>ATTR_*</tt> constants. Setting the * value returned by <tt>getAttributes</tt> will result in both files * having the same attributes. * @throws SmbException */ public void setAttributes( int attrs ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( attrs & ATTR_SET_MASK, 0L, 0L ); }
/** * Set the last modified time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>lastModified()</tt>, <tt>getLastModified()</tt>, and <tt>getDate()</tt> methods. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the last modified time as milliseconds since Jan 1, 1970 */ public void setLastModified( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, 0L, time ); }
/** * Set the last modified time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>lastModified()</tt>, <tt>getLastModified()</tt>, and <tt>getDate()</tt> methods. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the last modified time as milliseconds since Jan 1, 1970 */ public void setLastModified( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, 0L, time ); }
/** * Set the last modified time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>lastModified()</tt>, <tt>getLastModified()</tt>, and <tt>getDate()</tt> methods. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the last modified time as milliseconds since Jan 1, 1970 */ public void setLastModified( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, 0L, time ); }
/** * Set the create time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>createTime()</tt> method. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the create time as milliseconds since Jan 1, 1970 */ public void setCreateTime( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, time, 0L ); } /**
/** * Set the last modified time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>lastModified()</tt>, <tt>getLastModified()</tt>, and <tt>getDate()</tt> methods. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the last modified time as milliseconds since Jan 1, 1970 */ public void setLastModified( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, 0L, time ); }
/** * Set the create time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>createTime()</tt> method. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the create time as milliseconds since Jan 1, 1970 */ public void setCreateTime( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, time, 0L ); } /**
/** * Set the create time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>createTime()</tt> method. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the create time as milliseconds since Jan 1, 1970 */ public void setCreateTime( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, time, 0L ); } /**
/** * Set the create time of the file. The time is specified as milliseconds * from Jan 1, 1970 which is the same as that which is returned by the * <tt>createTime()</tt> method. * <p/> * This method does not apply to workgroups, servers, or shares. * * @param time the create time as milliseconds since Jan 1, 1970 */ public void setCreateTime( long time ) throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } setPathInformation( 0, time, 0L ); } /**
@Override public void setLastAccess ( long time ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(0, 0L, 0L, time); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setCreateTime ( long time ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(0, time, 0L, 0L); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setLastAccess ( long time ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(0, 0L, 0L, time); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setLastModified ( long time ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(0, 0L, time, 0L); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setLastModified ( long time ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(0, 0L, time, 0L); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setCreateTime ( long time ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(0, time, 0L, 0L); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setAttributes ( int attrs ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(attrs & ATTR_SET_MASK, 0L, 0L, 0L); } catch ( SmbException e ) { if ( e.getNtStatus() != 0xC00000BB ) { throw e; } throw new SmbUnsupportedOperationException("Attribute not supported by server"); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
@Override public void setAttributes ( int attrs ) throws SmbException { if ( this.fileLocator.isRootOrShare() ) { throw new SmbException("Invalid operation for workgroups, servers, or shares"); } try { setPathInformation(attrs & ATTR_SET_MASK, 0L, 0L, 0L); } catch ( SmbException e ) { if ( e.getNtStatus() != 0xC00000BB ) { throw e; } throw new SmbUnsupportedOperationException("Attribute not supported by server"); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }