Created
October 10, 2017 13:00
-
-
Save samsamm777/25f2b86454108ae37c038c792cdfda5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApplicationService, NotificationService, WorkspaceService } from '../../core'; | |
import { Component, OnInit } from '@angular/core'; | |
import { FlixBaseComponent } from '../base/flixbase.component'; | |
import { remote } from 'electron'; | |
@Component({ | |
selector: 'flx-main', | |
templateUrl: './main.component.html', | |
styleUrls: ['./main.component.scss'] | |
}) | |
export class FlxMainComponent extends FlixBaseComponent implements OnInit { | |
constructor( | |
public app: ApplicationService, | |
public workspace: WorkspaceService, | |
public notifier: NotificationService | |
) { | |
super(notifier); | |
} | |
ngOnInit() { | |
let fs = remote.require('fs'); | |
// fs.readFile('../../../assets/bigbuck/0001.png', (err, data) => { | |
// if (err) throw err; | |
// console.log(data); | |
// }); | |
fs.readdir('/home/sam/Desktop/assets', (err, dir) => { | |
for (var i = 0, path; path = dir[i]; i++) { | |
fs.readFile('/home/sam/Desktop/assets/' + path, (err, data) => { | |
if (err) throw err; | |
console.log(data); | |
}); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment