<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[isexe权限检测 - 编程技术参考——模具行业从业者必备知识手册]]></title><description><![CDATA[<p dir="auto">&lt;h2&gt;isexe&lt;/h2&gt;</p>
<p dir="auto">&lt;p&gt;Minimal module to check if a file is executable, and a normal file.&lt;/p&gt;</p>
<p dir="auto">&lt;p&gt;Uses &lt;code&gt;fs.stat&lt;/code&gt; and tests against the &lt;code&gt;PATHEXT&lt;/code&gt; environment variable on&lt;/p&gt;<br />
&lt;p&gt;Windows.&lt;/p&gt;</p>
<p dir="auto">&lt;h3&gt;USAGE&lt;/h3&gt;</p>
<p dir="auto">&lt;pre&gt;&lt;code&gt;<br />
var isexe = require('isexe')<br />
isexe('some-file-name', function (err, isExe) {<br />
if (err) {<br />
console.error('probably file does not exist or something', err)<br />
} else if (isExe) {<br />
console.error('this thing can be run')<br />
} else {<br />
console.error('cannot be run')<br />
}<br />
})</p>
<p dir="auto">// same thing but synchronous, throws errors<br />
var isExe = isexe.sync('some-file-name')</p>
<p dir="auto">// treat errors as just "not executable"<br />
isexe('maybe-missing-file', { ignoreErrors: true }, callback)<br />
var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })<br />
&lt;/code&gt;&lt;/pre&gt;</p>
<p dir="auto">&lt;h3&gt;API&lt;/h3&gt;</p>
<p dir="auto">&lt;h4&gt;<code>isexe(path, [options], [callback])</code>&lt;/h4&gt;</p>
<p dir="auto">&lt;p&gt;Check if the path is executable.  If no callback provided, and a&lt;/p&gt;<br />
&lt;p&gt;global &lt;code&gt;Promise&lt;/code&gt; object is available, then a Promise will be returned.&lt;/p&gt;</p>
<p dir="auto">&lt;p&gt;Will raise whatever errors may be raised by &lt;code&gt;fs.stat&lt;/code&gt;, unless&lt;/p&gt;<br />
&lt;p&gt;&lt;code&gt;options.ignoreErrors&lt;/code&gt; is set to true.&lt;/p&gt;</p>
<p dir="auto">&lt;h4&gt;<code>isexe.sync(path, [options])</code>&lt;/h4&gt;</p>
<p dir="auto">&lt;p&gt;Same as &lt;code&gt;isexe&lt;/code&gt; but returns the value and throws any errors raised.&lt;/p&gt;</p>
<p dir="auto">&lt;h4&gt;Options&lt;/h4&gt;</p>
<p dir="auto">&lt;ul&gt;<br />
&lt;li&gt;&lt;code&gt;ignoreErrors&lt;/code&gt; Treat all errors as "no, this is not executable", but&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;p&gt;  don't raise them.&lt;/p&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;code&gt;uid&lt;/code&gt; Number to use as the user id&lt;/li&gt;<br />
&lt;li&gt;&lt;code&gt;gid&lt;/code&gt; Number to use as the group id&lt;/li&gt;<br />
&lt;li&gt;&lt;code&gt;pathExt&lt;/code&gt; List of path extensions to use instead of &lt;code&gt;PATHEXT&lt;/code&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;p&gt;  environment variable on Windows.&lt;/p&gt;</p>
<p dir="auto">&lt;hr&gt;</p>
<p dir="auto">&lt;p&gt;本文由模极社发布&lt;/p&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;p&gt;!&lt;a href="upload://eOhMT1Q2yBePqWXJHc1w3KIwvWy.svg"&gt;isexe权限检测 - 编程技术参考&lt;/a&gt;&lt;/p&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;h4&gt;<img src="https://forum.mj7.cn/assets/plugins/nodebb-plugin-emoji/emoji/android/1f517.png?v=k0o2a4s5i30" class="not-responsive emoji emoji-android emoji--link" title=":link:" alt="🔗" /> 你可能还感兴趣&lt;/h4&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href="/t/3112/3112"&gt;MIM飞边&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="/t/2760/2760"&gt;高光模温机选型与使用指南&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="/t/3536/3536"&gt;天津国际模具城&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;p&gt;&lt;strong&gt;相关推荐：&lt;/strong&gt;&lt;/p&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href="<a href="https://www.mj7.cn/t/4836-4836" rel="nofollow ugc">https://www.mj7.cn/t/4836-4836</a>"&gt;北京模具产业 — 科技研发驱动型模具基地&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="<a href="https://www.mj7.cn/t/4835-4835" rel="nofollow ugc">https://www.mj7.cn/t/4835-4835</a>"&gt;上海模具产业 — 高端精密模具研发中心&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="<a href="https://www.mj7.cn/t/4834-4834" rel="nofollow ugc">https://www.mj7.cn/t/4834-4834</a>"&gt;产业集群与模具产业发展的关系&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;p&gt;你们厂里是怎么处理的？来评论区聊聊。&lt;/p&gt;</p>
]]></description><link>https://forum.mj7.cn/topic/7217/isexe权限检测-编程技术参考-模具行业从业者必备知识手册</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 09:02:00 GMT</lastBuildDate><atom:link href="https://forum.mj7.cn/topic/7217.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Apr 2026 22:00:13 GMT</pubDate><ttl>60</ttl></channel></rss>