25 #ifndef SBFILEUTILS_H_
26 #define SBFILEUTILS_H_
31 #include <nsIInputStream.h>
32 #include <nsIOutputStream.h>
33 #include <nsStringGlue.h>
37 class nsIOutputStream;
64 nsIOutputStream ** aStream);
68 nsresult
sbReadFile(nsIFile * aFile, nsACString &aBuffer);
97 PRBool aAllPlatforms);
109 nsCOMPtr<nsIInputStream>,
112 nsCOMPtr<nsIOutputStream>,
116 mValue->Remove(PR_FALSE));
123 #define SB_DEFAULT_FILE_PERMISSIONS 0644
124 #define SB_DEFAULT_DIRECTORY_PERMISSIONS 0755
138 #define SB_FILE_BAD_CHARACTERS FILE_ILLEGAL_CHARACTERS FILE_PATH_SEPARATOR
139 #define SB_FILE_BAD_CHARACTERS_ALL_PLATFORMS CONTROL_CHARACTERS "/\\:*?\"<>|"
SB_AUTO_NULL_CLASS(sbAutoInputStream, nsCOMPtr< nsIInputStream >, mValue->Close())
nsresult sbConsumeStream(nsIInputStream *aSource, PRUint32 aMaxCount, nsACString &aBuffer)
nsresult sbOpenOutputStream(nsIFile *aFile, nsIOutputStream **aStream)
nsresult sbNewFileURI(nsIFile *aFile, nsIURI **aURI)
nsresult sbOpenInputStream(nsAString const &aPath, nsIInputStream **aStream)
nsresult sbReadFile(nsIFile *aFile, nsACString &aBuffer)
void RemoveBadFileNameCharacters(nsAString &aFileName, PRBool aAllPlatforms)