filez/labs/hipstered/js/hipstered.js
/**
* File class to operate with files
*/
File class to operate with files
File class to operate with files
function File (id, name, content) {
	this.id = id;
	this.name = name;
	this.content = content;
	this.extension = ''; 
	this.owner = ''; 
	this.lastUpdate = new Date();
	this.save = function (newContent) {
		this.content = newContent;
		this.lastUpdate = new Date();
	}
	this.toString = function () {
		return "Id: " + this.id +
				", Name: " + this.name + 
				", Length: " + this.content.length +
				", Extension: " + this.extension +
				", Owner: " + this.owner + 
				", Last update:" + this.lastUpdate;
	};
}
function File ( id , name , content ) { this . id = id ; this . name = name ; this . content = content ; this . extension = '' ; this . owner = '' ; this . lastUpdate = new Date ( ) ; this . save = function ( newContent ) { this . content = newContent ; this . lastUpdate = new Date ( ) ; } this . toString = function ( ) { return "Id: " + this . id + ", Name: " + this . name + ", Length: " + this . content . length + ", Extension: " + this . extension + ", Owner: " + this . owner + ", Last update:" + this . lastUpdate ; } ; }
File class to operate with files
File class to operate with files
// future // future /**
	* saves file content
	*/ /**
	* dumps file info
	*/