[update] Add file icons

This commit is contained in:
brunosimon
2016-08-14 19:02:27 +02:00
parent a2e7f6b541
commit 030c078335
32 changed files with 611 additions and 36 deletions
+11 -5
View File
@@ -15,10 +15,15 @@ class File
this.path = {}
this.path.directory = _options.path
this.path.full = this.path.directory + '/' + this.name
this.path.parts = this.path.full.split( paths.separator )
this.versions = []
this.socket = _options.socket
let name_parts = this.name.split( '.' )
if( name_parts.length > 1 )
this.extension = name_parts[ name_parts.length - 1 ]
else
this.extension = ''
// Create first version
if( typeof _options.content !== 'undefined' )
this.create_version( _options.content )
@@ -53,10 +58,11 @@ class File
{
// Set up
let result = {}
result.id = this.id
result.name = this.name
result.path = this.path
result.versions = this.versions
result.id = this.id
result.name = this.name
result.path = this.path
result.versions = this.versions
result.extension = this.extension
return result
}