<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SharedFile Class — pysmb 1.2.1 documentation</title>
<link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.2.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="pysmb 1.2.1 documentation" href="../index.html" />
<link rel="next" title="SMB Exceptions" href="smb_exceptions.html" />
<link rel="prev" title="SharedDevice Class" href="smb_SharedDevice.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="smb_exceptions.html" title="SMB Exceptions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="smb_SharedDevice.html" title="SharedDevice Class"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pysmb 1.2.1 documentation</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="smb_SharedDevice.html"
title="previous chapter">SharedDevice Class</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="smb_exceptions.html"
title="next chapter">SMB Exceptions</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/api/smb_SharedFile.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="sharedfile-class">
<h1>SharedFile Class<a class="headerlink" href="#sharedfile-class" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="smb.base.SharedFile">
<em class="property">class </em><code class="descclassname">smb.base.</code><code class="descname">SharedFile</code><span class="sig-paren">(</span><em>create_time</em>, <em>last_access_time</em>, <em>last_write_time</em>, <em>last_attr_change_time</em>, <em>file_size</em>, <em>alloc_size</em>, <em>file_attributes</em>, <em>short_name</em>, <em>filename</em>, <em>file_id=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/smb/base.html#SharedFile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#smb.base.SharedFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Contain information about a file/folder entry that is shared on the shared device.</p>
<p>As an application developer, you should not need to instantiate a <em>SharedFile</em> instance directly in your application.
These <em>SharedFile</em> instances are usually returned via a call to <em>listPath</em> method in <a class="reference internal" href="smb_SMBProtocolFactory.html"><em>smb.SMBProtocol.SMBProtocolFactory</em></a>.</p>
<p>If you encounter <em>SharedFile</em> instance where its short_name attribute is empty but the filename attribute contains a short name which does not correspond
to any files/folders on your remote shared device, it could be that the original filename on the file/folder entry on the shared device contains
one of these prohibited characters: “/[]:+|<>=;?,* (see [MS-CIFS]: 2.2.1.1.1 for more details).</p>
<p>The following attributes are available:</p>
<ul class="simple">
<li>create_time : Float value in number of seconds since 1970-01-01 00:00:00 to the time of creation of this file resource on the remote server</li>
<li>last_access_time : Float value in number of seconds since 1970-01-01 00:00:00 to the time of last access of this file resource on the remote server</li>
<li>last_write_time : Float value in number of seconds since 1970-01-01 00:00:00 to the time of last modification of this file resource on the remote server</li>
<li>last_attr_change_time : Float value in number of seconds since 1970-01-01 00:00:00 to the time of last attribute change of this file resource on the remote server</li>
<li>file_size : File size in number of bytes</li>
<li>alloc_size : Total number of bytes allocated to store this file</li>
<li>file_attributes : A SMB_EXT_FILE_ATTR integer value. See [MS-CIFS]: 2.2.1.2.3. You can perform bit-wise tests to determine the status of the file using the ATTR_xxx constants in smb_constants.py.</li>
<li>short_name : Unicode string containing the short name of this file (usually in 8.3 notation)</li>
<li>filename : Unicode string containing the long filename of this file. Each OS has a limit to the length of this file name. On Windows, it is 256 characters.</li>
<li>file_id : Long value representing the file reference number for the file. If the remote system does not support this field, this field will be None or 0. See [MS-FSCC]: 2.4.17</li>
</ul>
<dl class="attribute">
<dt id="smb.base.SharedFile.alloc_size">
<code class="descname">alloc_size</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.alloc_size" title="Permalink to this definition">¶</a></dt>
<dd><p>Total number of bytes allocated to store this file</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.create_time">
<code class="descname">create_time</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.create_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Float value in number of seconds since 1970-01-01 00:00:00 to the time of creation of this file resource on the remote server</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.file_attributes">
<code class="descname">file_attributes</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.file_attributes" title="Permalink to this definition">¶</a></dt>
<dd><p>A SMB_EXT_FILE_ATTR integer value. See [MS-CIFS]: 2.2.1.2.3. You can perform bit-wise tests to determine the status of the file using the ATTR_xxx constants in smb_constants.py.</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.file_id">
<code class="descname">file_id</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.file_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Long value representing the file reference number for the file. If the remote system does not support this field, this field will be None or 0. See [MS-FSCC]: 2.4.17</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.file_size">
<code class="descname">file_size</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.file_size" title="Permalink to this definition">¶</a></dt>
<dd><p>File size in number of bytes</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.filename">
<code class="descname">filename</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.filename" title="Permalink to this definition">¶</a></dt>
<dd><p>Unicode string containing the long filename of this file. Each OS has a limit to the length of this file name. On Windows, it is 256 characters.</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.isDirectory">
<code class="descname">isDirectory</code><a class="headerlink" href="#smb.base.SharedFile.isDirectory" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenient property to return True if this file resource is a directory on the remote server</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.isNormal">
<code class="descname">isNormal</code><a class="headerlink" href="#smb.base.SharedFile.isNormal" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenient property to return True if this is a normal file.</p>
<p>Note that pysmb defines a normal file as a file entry that is not read-only, not hidden, not system, not archive and not a directory.
It ignores other attributes like compression, indexed, sparse, temporary and encryption.</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.isReadOnly">
<code class="descname">isReadOnly</code><a class="headerlink" href="#smb.base.SharedFile.isReadOnly" title="Permalink to this definition">¶</a></dt>
<dd><p>A convenient property to return True if this file resource is read-only on the remote server</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.last_access_time">
<code class="descname">last_access_time</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.last_access_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Float value in number of seconds since 1970-01-01 00:00:00 to the time of last access of this file resource on the remote server</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.last_attr_change_time">
<code class="descname">last_attr_change_time</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.last_attr_change_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Float value in number of seconds since 1970-01-01 00:00:00 to the time of last attribute change of this file resource on the remote server</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.last_write_time">
<code class="descname">last_write_time</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.last_write_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Float value in number of seconds since 1970-01-01 00:00:00 to the time of last modification of this file resource on the remote server</p>
</dd></dl>
<dl class="attribute">
<dt id="smb.base.SharedFile.short_name">
<code class="descname">short_name</code><em class="property"> = None</em><a class="headerlink" href="#smb.base.SharedFile.short_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Unicode string containing the short name of this file (usually in 8.3 notation)</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="smb_exceptions.html" title="SMB Exceptions"
>next</a> |</li>
<li class="right" >
<a href="smb_SharedDevice.html" title="SharedDevice Class"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pysmb 1.2.1 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2001-2020, Michael Teo https://miketeo.net/.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.6.
</div>
</body>
</html>