【TODO】Atom源码阅读-pathwatcher
来源:互联网 发布:java单向链表 编辑:程序博客网 时间:2024/04/27 21:36
Atom项目基于许多子项目,这样方便维护与测试。今天来看看pathwatcher(atom/node-pathwatcher)这个项目。
既然nodejs本身提供了监控文件变化的方法,Atom还做了这样一个项目,是为了什么呢?官网的文档等于没有。。。所以还是得自己看。
File类
虽然是pathwatcher项目中的类,但是Atom的其他项目用的也是这个类,比如text-buffer
这个项目,用的就是File类,其中的关键代码如下(text-buffer.coffee
):
{File} = require 'pathwatcher'# Public: Set the path for the buffer's associated file.## * `filePath` A {String} representing the new file pathsetPath: (filePath) -> return if filePath == @getPath() if filePath @file = new File(filePath) @file.setEncoding(@getEncoding()) @subscribeToFile() else @file = null @emitter.emit 'did-change-path', @getPath()
TODO
0 0
- 【TODO】Atom源码阅读-pathwatcher
- TODO 阅读volley源码 尝试进行volley源码解析
- TODO-MVP源码解析
- Atom类源码分析
- todo-mvvm-databinding源码分析
- todo
- todo
- todo
- Todo
- [TODO]
- TODO
- todo
- todo
- TODO
- //TODO
- ToDo
- TODO
- TODO
- Unity打包的APK中Asset文件分析
- [leetcode oj 231]Power of Two
- 事件分发和响应链
- 针对ie8的css hack
- FS5800光纤交换机命令行划分方法
- 【TODO】Atom源码阅读-pathwatcher
- TCP连接,断开
- postgreSQL用C写触发器的例子中的问题
- centos 编译swoole 出错解决方案
- 装饰者模式
- COM 组件设计与应用(五)——用 ATL 写第一个组件
- view的分类
- android studio链接不上真机解决方案
- angular.bootstrap