Atom open files


#1

I have actual path of a file … I want to open that file in atom from a package… Is there a way to do that???
Does atom provides any methods to do that???


#2

Yes, there is a package to execute python files by pressing F5 or F6. It basicly runs a shell command by triggering one of the buttons. You can edit the shell commands in the settings of the package to execute any command with the path of the current opened file in the editor with the placeholder {file}.
The settings are intuitive and easy to understand. :grinning: :de:


#3

sorry but you misunderstood the question… I have the path of a file in atom package and i want to open that file in the atom editor using that path and from the package only… without using atom GUI (open file option)


#4

Oh, sorry, but there i think I can’t help you. Sorry… :hushed:


#5

You‘re looking for atom.workspace.open()


#6

Thanks I was looking for the same…


#7

can you help me with 1 more thing … I also want the reference variable to the file that I opened using path because I want to copy the data of the file which I opened using path. for copy I can use getText() but to use this method I need reference variable to the file opened using path.


#8

Thanks or the help… I get a way to do that using the file system library of nodejs.