Visit Mozilla.org

nsIFile:normalize

From MDC

« XPCOM API Reference

[edit] Summary

This method is used to canonicalize the path represented by this nsIFile.

 void normalize();

[edit] Exceptions Thrown

NS_ERROR_FILE_TARGET_DOES_NOT_EXIST - Indicates that the file path does not exist. NS_ERROR_FILE_DESTINATION_NOT_DIR - Indicates that a component of the path prefix is not a directory. NS_ERROR_FILE_ACCESS_DENIED - Read or search permission was denied for a component of the path prefix.

[edit] Remarks

As of Mozilla 1.7, this method is only implemented under UNIX builds (except for Mac OSX). This method will fail if the path does not exist.