Microsoft SDK for Java

ClientStore Class

The ClientStore Class of the com.ms.io.clientstorage package helps manage client storage by enforcing storage limitations and providing access to client stores. It includes methods for creating directories, renaming files, getting a list of files in a directory, deleting files, and reading or writing to a file.

public class ClientStore
{
  // Fields
  public static final int LIST_FL_NO_DIRECTORIES;
  public static final int LIST_FL_NO_FILES;
  public static final int LIST_FL_RECURSE;
  public static final int OPEN_FL_APPEND;
  public static final int OPEN_FL_EXPENDABLE;
  public static final int OPEN_FL_SHARED;
  public static final int OPEN_FL_WRITABLE;
  public static final int STORE_FL_LOCAL;
  public static final int STORE_FL_ROAMING;

  // Methods
  public boolean canAccessRoamingFiles();
  public void copyFile(String curstgfilename,
        String newstgfilename) throws IOException;
  public void copyFile(String curstgfilename, int curflags, String
        newstgfilename, int newflags) throws IOException;
  public void createDirectories(String stgdirpath)
        throws IOException;
  public void createDirectories(String stgdirpath,
        int flags) throws IOException;
  public void createDirectory(String stgdirname)
        throws IOException;
  public void createDirectory(String stgdirname, int flags) throws
        IOException;
  public void deleteDirectory(String stgfilename)
        throws IOException;
  public void deleteDirectory(String stgfilename,
        int flags) throws IOException;
  public void deleteFile(String stgfilename) throws IOException;
  public void deleteFile(String stgfilename, int flags)
        throws IOException;
  public boolean equals(Object o);
  public boolean fileExists(String stgfilename) throws IOException;
  public boolean fileExists(String stgfilename, int flags)
        throws IOException;
  protected void finalize();
  public String getCurrentDirectory();
  public long getFileSize(String stgfilename) throws IOException;
  public long getFileSize(String stgfilename, int flags)
        throws IOException;
  public long getLastModificationTime(String stgfilename)
        throws IOException;
  public long getLastModificationTime(String stgfilename,
        int flags) throws IOException;
  public long getStorageLimit();
  public long getStorageRemaining();
  public long getStorageUsed();
  public long getStorageUsed(int flags);
  public boolean isDirectory(String stgfilename)
        throws IOException;
  public boolean isDirectory(String stgfilename, int flags) throws
        IOException;
  public boolean isExpendable(String stgfilename)
        throws IOException;
  public boolean isExpendable(String stgfilename,
        int flags) throws IOException;
  public boolean isFile(String stgfilename) throws IOException;
  public boolean isFile(String stgfilename, int flags)
        throws IOException;
  public String[] listFiles(String stgdir) throws IOException;
  public String[] listFiles(String stgdir,
        FilenameFilter filter) throws IOException;
  public String[] listFiles(String stgdir, int flags)
        throws IOException;
  public String[] listFiles(String stgdir, FilenameFilter filter,
        int flags) throws IOException;
  public void markFileAsExpendable(String stgfilename,
        boolean deletewhenfull) throws IOException;
  public void markFileAsExpendable(String stgfilename, int flags,
        boolean deletewhenfull) throws IOException;
  public RandomAccessFile openRandom(String stgfilename,
        boolean writable) throws IOException;
  public RandomAccessFile openRandom(String stgfilename,
        int flags) throws IOException;
  public RandomAccessFile openRandom(String stgfilename)
        throws IOException;
  public InputStream openReadable(String stgfilename,
        int flags) throws IOException;
  public InputStream openReadable(String stgfilename)
        throws IOException;
  public OutputStream openWritable(String stgfilename,
        int flags) throws IOException;
  public OutputStream openWritable(String stgfilename)
        throws IOException;
  public OutputStream openWritable(String stgfilename,
        boolean append) throws IOException;
  public boolean purgeExpendableFiles(long spacerequired,
        int flags) throws IOException;
  public boolean purgeExpendableFiles(long spacerequired)
        throws IOException;
  public boolean purgeExpendableFiles() throws IOException;
  public void renameFile(String curstgfilename,
        String newstgfilename) throws IOException;
  public void renameFile(String curstgfilename, int curflags,
        String newstgfilename, int newflags) throws IOException;
  public void setCurrentDirectory(String newcurdir)
        throws IOException;
  public void setStorageLimit(long newlimit) throws IOException;
}

© 1999 Microsoft Corporation. All rights reserved. Terms of use.