blackboard.cms.filesystem
Class CSDirectory

java.lang.Object
  extended by blackboard.cms.filesystem.CSEntry
      extended by blackboard.cms.filesystem.CSDirectory
Direct Known Subclasses:
CSCustomDirectory

public class CSDirectory
extends CSEntry

A directory in the system. Methods are available for managing quotas for each directory. These quotas are the total space alloted by the owner for all files and sub-directories contained in the directory. Once the quota is reached, no new files can be added to the directory or subdirectories

Since:
Bb CS 1.2
Version:
$Revision: #1 $

Field Summary
static long NO_QUOTA
           
 
Method Summary
 long getAvailableQuota()
          Returns the amount of unused quota remaining on this directory in bytes.
 java.util.List getDirectoryContents()
          Returns a List of all readable CSEntry objects which this Directory contains and are findable by navigating down the hiearchy directly.
 long getQuota()
          Returns the quota for this directory in bytes.
 boolean isCustomDirectory()
          Returns whether the directory is of type CSCustomDirectory
 boolean isQuotaLimited()
          Returns true if this directory or any parent directory has a quota limit.
 void setQuota(long quota)
          Sets the quota for this directory.
 
Methods inherited from class blackboard.cms.filesystem.CSEntry
delete, deleteAccessControlEntry, getAccessControlEntries, getAccessControlEntry, getBaseName, getCreationTimestamp, getCSEntryMetadata, getFileSystemEntry, getFullPath, getLastUpdateTimestamp, getParentPath, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_QUOTA

public static long NO_QUOTA
Method Detail

isCustomDirectory

public boolean isCustomDirectory()
Returns whether the directory is of type CSCustomDirectory

Returns:
false

getQuota

public long getQuota()
Returns the quota for this directory in bytes.

Returns:
a long representing the quota in number of bytes

setQuota

public void setQuota(long quota)
              throws CSFileSystemException
Sets the quota for this directory.

Parameters:
quota - a long representing the quota in number of bytes
Throws:
CSFileSystemException

getAvailableQuota

public long getAvailableQuota()
                       throws CSFileSystemException
Returns the amount of unused quota remaining on this directory in bytes.

Returns:
a long representing the amount of unused quota remaining on this directory in number of bytes
Throws:
CSFileSystemException

isQuotaLimited

public boolean isQuotaLimited()
                       throws CSFileSystemException
Returns true if this directory or any parent directory has a quota limit.

Returns:
a boolean if this directory or any ancestor directory has a quota limit, false otherwise.
Throws:
CSFileSystemException

getDirectoryContents

public java.util.List getDirectoryContents()
                                    throws CSFileSystemException
Returns a List of all readable CSEntry objects which this Directory contains and are findable by navigating down the hiearchy directly.

Returns:
a List of all readable CSEntry objects
Throws:
CSFileSystemException


Copyright © 2003-2004 Blackboard, Inc. All Rights Reserved.