smartssh/ts/smartssh.classes.sshdir.ts

23 lines
756 B
TypeScript
Raw Normal View History

2016-05-31 17:00:52 +00:00
import "typings-global";
import * as plugins from "./smartssh.plugins";
import * as helpers from "./smartssh.classes.helpers";
import {SshKey} from "./smartssh.classes.sshkey";
import {SshConfig} from "./smartssh.classes.sshconfig";
export class SshDir { // sshDir class -> NOT EXPORTED, ONLY FOR INTERNAL USE
2016-05-31 22:56:24 +00:00
path:string; // the path of the ssh directory
2016-05-31 17:00:52 +00:00
constructor(sshDirPathArg:string){
2016-05-31 22:56:24 +00:00
let sshDirPath:string;
if(sshDirPathArg){
sshDirPath = sshDirPathArg;
} else {
sshDirPath = plugins.smartpath.home
}
this.path = sshDirPath;
2016-05-31 17:00:52 +00:00
}
sync(sshConfigArg:SshConfig,sshKeysArg:SshKey[]){
2016-05-31 17:00:52 +00:00
};
getKeys(){
return helpers.sshKeyArrayFromDir(this.path);
}
}