 	stat: (fileName) ->
 		return this.statSync path.join this.absolutePath, fileName
 
+	remove: (fileName) ->
+		return this.unlinkSync path.join this.absolutePath, fileName
+
 	getFileWithReadStream: (fileName) ->
-		stat = this.stat fileName
-		if not stat?
+		try
+			stat = this.stat fileName
+			rs = this.createReadStream fileName
+
+			return {
+				readStream: rs
+				# contentType: file.contentType
+				length: stat.size
+			}
+		catch e
 			return undefined
 
-		rs = this.createReadStream fileName
-
-		return {
-			readStream: rs
-			# contentType: file.contentType
-			length: stat.size
-		}+	deleteFile: (fileName) ->
+		try
+			stat = this.stat fileName
+			return this.remove fileName
+		catch e
+			return undefined

			length: file.length
		}


RocketFile.FileSystem = class
	constructor: (config={}) ->

		this.absolutePath = path.resolve absolutePath
		mkdirp.sync this.absolutePath
		this.statSync = Meteor.wrapAsync fs.stat.bind fs
		this.unlinkSync = Meteor.wrapAsync fs.unlink.bind fs

	createWriteStream: (fileName, contentType) ->
		self = this
