Property | Type | Description | |
---|---|---|---|
Dfs | Dfs |
Method | Description | |
---|---|---|
CanRead ( ) : bool |
Tests to see if the file this Tests to see if the file this |
|
CanWrite ( ) : bool |
Tests to see if the file this Tests to see if the file this |
|
Connect ( ) : void |
It is not necessary to call this method directly. It is not necessary to call this method directly. This is the URLConnection implementation of connect(). |
|
CopyTo ( SmbFile dest ) : void |
This method will copy the file or directory represented by this SmbFile and it's sub-contents to the location specified by the dest parameter. This method will copy the file or directory represented by this SmbFile and it's sub-contents to the location specified by the dest parameter. This file and the destination file do not need to be on the same host. This operation does not copy extended file attibutes such as ACLs but it does copy regular attributes as well as create and last write times. This method is almost twice as efficient as manually copying as it employs an additional write thread to read and write data concurrently. It is not possible (nor meaningful) to copy entire workgroups or servers. |
|
CreateNewFile ( ) : void |
Create a new file but fail if it already exists. Create a new file but fail if it already exists. The check for existance of the file and it's creation are an atomic operation with respect to other filesystem activities. |
|
CreateTime ( ) : long |
Retrieve the time this Retrieve the time this |
|
Delete ( ) : void |
This method will delete the file or directory specified by this This method will delete the file or directory specified by this |
|
Equals ( object obj ) : bool |
Tests to see if two Tests to see if two For example, assuming the server smb://192.168.1.15/share/DIR/foo.txt smb://angus/share/data/../dir/foo.txt |
|
Exists ( ) : bool |
Tests to see if the SMB resource exists. Tests to see if the SMB resource exists. If the resource refers only to a server, this method determines if the server exists on the network and is advertising SMB services. If this resource refers to a workgroup, this method determines if the workgroup name is valid on the local SMB network. If this |
|
GetAttributes ( ) : int |
Return the attributes of this file. Return the attributes of this file. Attributes are represented as a bitset that must be masked with ATTR_* constants to determine if they are set or unset. The value returned is suitable for use with the setAttributes() method. |
|
GetCanonicalPath ( ) : string |
Returns the full URL of this SMB resource with '.' and '..' components factored out. Returns the full URL of this SMB resource with '.' and '..' components factored out. An |
|
GetContentLength ( ) : int |
This URLConnection method just returns the result of length(). This URLConnection method just returns the result of length(). |
|
GetDate ( ) : long |
This URLConnection method just returns the result of lastModified. This URLConnection method just returns the result of lastModified. |
|
GetDfsPath ( ) : string |
If the path of this If the path of this |
|
GetDiskFreeSpace ( ) : long |
This method returns the free disk space in bytes of the drive this share represents or the drive on which the directory or file resides. This method returns the free disk space in bytes of the drive this share represents or the drive on which the directory or file resides. Objects other than TYPE_SHARE or TYPE_FILESYSTEM will result in 0L being returned. |
|
GetHashCode ( ) : int |
Computes a hashCode for this file based on the URL string and IP address if the server. Computes a hashCode for this file based on the URL string and IP address if the server. The hashing function uses the hashcode of the server address, the canonical representation of the URL, and does not compare authentication information. In essance, two |
|
GetInputStream ( ) : InputStream |
This URLConnection method just returns a new SmbFileInputStream created with this file. This URLConnection method just returns a new SmbFileInputStream created with this file. |
|
GetLastModified ( ) : long |
This URLConnection method just returns the result of lastModified. This URLConnection method just returns the result of lastModified. |
|
GetName ( ) : string |
Returns the last component of the target URL. Returns the last component of the target URL. This will effectively be the name of the file or directory represented by this |
|
GetOutputStream ( ) : OutputStream |
This URLConnection method just returns a new SmbFileOutputStream created with this file. This URLConnection method just returns a new SmbFileOutputStream created with this file. |
|
GetParent ( ) : string |
Everything but the last component of the URL representing this SMB resource is effectivly it's parent. Everything but the last component of the URL representing this SMB resource is effectivly it's parent. The root URL |
|
GetPath ( ) : string |
Returns the full uncanonicalized URL of this SMB resource. Returns the full uncanonicalized URL of this SMB resource. An |
|
GetPrincipal ( ) : Principal |
Returns the NtlmPasswordAuthentication object used as credentials with this file or pipe. Returns the NtlmPasswordAuthentication object used as credentials with this file or pipe. This can be used to retrieve the username for example: String username = f.getPrincipal().getName(); The Principal object returned will never be null however the username can be null indication anonymous credentials were used (e.g. some IPC$ services). |
|
GetSecurity ( ) : Ace[] |
Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory. Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory. Initially, the SIDs within each ACE will not be resolved however when getType(), getDomainName(), getAccountName(), or toString() is called, the names will attempt to be resolved. If the names cannot be resolved (e.g. due to temporary network failure), the said methods will return default values (usually S-X-Y-Z strings of fragments of). Alternatively getSecurity(true) may be used to resolve all SIDs together and detect network failures. |
|
GetSecurity ( bool resolveSids ) : Ace[] |
Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory. Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory. If no DACL is present, null is returned. If the DACL is empty, an array with 0 elements is returned. |
|
GetServer ( ) : string |
Retrieve the hostname of the server for this SMB resource. Retrieve the hostname of the server for this SMB resource. If this |
|
GetShare ( ) : string |
Retrieves the share associated with this SMB resource. Retrieves the share associated with this SMB resource. In the case of |
|
GetShareSecurity ( bool resolveSids ) : Ace[] |
Return an array of Access Control Entry (ACE) objects representing the share permissions on the share exporting this file or directory. Return an array of Access Control Entry (ACE) objects representing the share permissions on the share exporting this file or directory. If no DACL is present, null is returned. If the DACL is empty, an array with 0 elements is returned. Note that this is different from calling getSecurity on a share. There are actually two different ACLs for shares - the ACL on the share and the ACL on the folder being shared. Go to Computer Management > System Tools > Shared Folders > Shares and look at the Properties for a share. You will see two tabs - one for "Share Permissions" and another for "Security". These correspond to the ACLs returned by getShareSecurity and getSecurity respectively. |
|
GetType ( ) : int |
Returns type of of object this SmbFile represents. Returns type of of object this SmbFile represents. |
|
GetUncPath ( ) : string |
Retuns the Windows UNC style path with backslashs intead of forward slashes. Retuns the Windows UNC style path with backslashs intead of forward slashes. |
|
IsDirectory ( ) : bool |
Tests to see if the file this Tests to see if the file this |
|
IsFile ( ) : bool |
Tests to see if the file this Tests to see if the file this |
|
IsHidden ( ) : bool |
Tests to see if the file this SmbFile represents is marked as hidden. Tests to see if the file this SmbFile represents is marked as hidden. This method will also return true for shares with names that end with '$' such as |
|
LastModified ( ) : long |
Retrieve the last time the file represented by this Retrieve the last time the file represented by this |
|
Length ( ) : long |
Returns the length of this SmbFile in bytes. Returns the length of this SmbFile in bytes. If this object is a TYPE_SHARE the total capacity of the disk shared in bytes is returned. If this object is a directory or a type other than TYPE_SHARE, 0L is returned. |
|
List ( ) : string[] |
List the contents of this SMB resource. List the contents of this SMB resource. The list returned by this method will be;
|
|
List ( ISmbFilenameFilter filter ) : string[] |
List the contents of this SMB resource. List the contents of this SMB resource. The list returned will be identical to the list returned by the parameterless |
|
ListFiles ( ) : SmbFile[] |
List the contents of this SMB resource as an array of List the contents of this SMB resource as an array of The list of
|
|
ListFiles ( ISmbFileFilter filter ) : SmbFile[] |
List the contents of this SMB resource. List the contents of this SMB resource. The list returned will be identical to the list returned by the parameterless |
|
ListFiles ( ISmbFilenameFilter filter ) : SmbFile[] |
List the contents of this SMB resource. List the contents of this SMB resource. The list returned will be identical to the list returned by the parameterless |
|
ListFiles ( string wildcard ) : SmbFile[] |
The CIFS protocol provides for DOS "wildcards" to be used as a performance enhancement. The CIFS protocol provides for DOS "wildcards" to be used as a performance enhancement. The client does not have to filter the names and the server does not have to return all directory entries. The wildcard expression may consist of two special meta characters in addition to the normal filename characters. The '*' character matches any number of characters in part of a name. If the expression begins with one or more '?'s then exactly that many characters will be matched whereas if it ends with '?'s it will match that many characters or less. Wildcard expressions will not filter workgroup names or server names. winnt> ls c?o clock.avi -rw-- 82944 Mon Oct 14 1996 1:38 AM Cookies drw-- 0 Fri Nov 13 1998 9:42 PM 2 items in 5ms |
|
Mkdir ( ) : void |
Creates a directory with the path specified by this Creates a directory with the path specified by this |
|
Mkdirs ( ) : void |
Creates a directory with the path specified by this SmbFile and any parent directories that do not exist. Creates a directory with the path specified by this SmbFile and any parent directories that do not exist. This method will fail when used with |
|
RenameTo ( SmbFile dest ) : void |
Changes the name of the file this Changes the name of the file this Remember: |
|
SetAttributes ( int attrs ) : void |
Set the attributes of this file. Set the attributes of this file. Attributes are composed into a bitset by bitwise ORing the ATTR_* constants. Setting the value returned by getAttributes will result in both files having the same attributes. |
|
SetCreateTime ( long time ) : void |
Set the create time of the file. Set the create time of the file. The time is specified as milliseconds from Jan 1, 1970 which is the same as that which is returned by the createTime() method. This method does not apply to workgroups, servers, or shares. |
|
SetLastModified ( long time ) : void |
Set the last modified time of the file. Set the last modified time of the file. The time is specified as milliseconds from Jan 1, 1970 which is the same as that which is returned by the lastModified(), getLastModified(), and getDate() methods. This method does not apply to workgroups, servers, or shares. |
|
SetReadOnly ( ) : void |
Make this file read-only. Make this file read-only. This is shorthand for setAttributes( getAttributes() | ATTR_READ_ONLY ). |
|
SetReadWrite ( ) : void |
Turn off the read-only attribute of this file. Turn off the read-only attribute of this file. This is shorthand for setAttributes( getAttributes() & ~ATTR_READONLY ). |
|
SmbFile ( SmbFile context, string name ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. The second parameter is a relative path from the |
|
SmbFile ( SmbFile context, string name, int shareAccess ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. The second parameter is a relative path from the |
|
SmbFile ( Uri url, NtlmPasswordAuthentication auth ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory from a URL object and an NtlmPasswordAuthentication object. Constructs an SmbFile representing a resource on an SMB network such as a file or directory from a URL object and an NtlmPasswordAuthentication object. |
|
SmbFile ( string url ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. See the description and examples of smb URLs above. |
|
SmbFile ( string url, NtlmPasswordAuthentication auth ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. |
|
SmbFile ( string url, NtlmPasswordAuthentication auth, int shareAccess ) : System |
Constructs an SmbFile representing a file on an SMB network. Constructs an SmbFile representing a file on an SMB network. The shareAccess parameter controls what permissions other clients have when trying to access the same file while this instance is still open. This value is either FILE_NO_SHARE or any combination of FILE_SHARE_READ, FILE_SHARE_WRITE, and FILE_SHARE_DELETE logically OR'd together. |
|
SmbFile ( string context, string name ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. The second parameter is a relative path from the |
|
SmbFile ( string context, string name, NtlmPasswordAuthentication auth ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. The second parameter is a relative path from the |
|
SmbFile ( string context, string name, NtlmPasswordAuthentication auth, int shareAccess ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory. Constructs an SmbFile representing a resource on an SMB network such as a file or directory. The second parameter is a relative path from the |
|
ToString ( ) : string |
Returns the string representation of this SmbFile object. Returns the string representation of this SmbFile object. This will be the same as the URL used to construct this |
Method | Description | |
---|---|---|
PathNamesPossiblyEqual ( string path1, string path2 ) : bool | ||
SmbFile ( Uri url ) : System |
Constructs an SmbFile representing a resource on an SMB network such as a file or directory from a URL object. Constructs an SmbFile representing a resource on an SMB network such as a file or directory from a URL object. |
Method | Description | |
---|---|---|
Blank_resp ( ) : |
||
Close ( ) : void | ||
Close ( int f, long lastWriteTime ) : void | ||
Close ( long lastWriteTime ) : void | ||
Connect0 ( ) : void | ||
CopyTo0 ( SmbFile dest, byte b, int bsize, WriterThread w, SmbComReadAndX req, SmbComReadAndXResponse resp ) : void | ||
Delete ( string fileName ) : void | ||
DoConnect ( ) : void | ||
DoDfsRootEnum ( ) : IFileEntry[] | ||
DoEnum ( List | ||
DoFindFirstNext ( List | ||
DoMsrpcShareEnum ( ) : IFileEntry[] | ||
DoNetServerEnum ( List | ||
DoNetShareEnum ( ) : IFileEntry[] | ||
DoShareEnum ( List | ||
GetAddress ( ) : UniAddress | ||
GetFirstAddress ( ) : UniAddress | ||
GetNextAddress ( ) : UniAddress | ||
GetServerWithDfs ( ) : string | ||
GetUncPath0 ( ) : string | ||
HasNextAddress ( ) : bool | ||
IsConnected ( ) : bool | ||
IsOpen ( ) : bool | ||
IsWorkgroup0 ( ) : bool | ||
List ( string wildcard, int searchAttributes, ISmbFilenameFilter fnf, ISmbFileFilter ff ) : string[] | ||
ListFiles ( string wildcard, int searchAttributes, ISmbFilenameFilter fnf, ISmbFileFilter ff ) : SmbFile[] | ||
Open ( int flags, int access, int attrs, int options ) : void | ||
Open0 ( int flags, int access, int attrs, int options ) : int | ||
ProcessAces ( Ace aces, bool resolveSids ) : void | ||
QueryFsInformation ( int level ) : long | ||
QueryLookup ( string query, string param ) : string | ||
QueryPath ( string path, int infoLevel ) : IInfo | ||
RemoveCurrentAddress ( ) : void | ||
ResolveDfs ( ServerMessageBlock request ) : void | ||
Send ( ServerMessageBlock request, ServerMessageBlock response ) : void | ||
SetPathInformation ( int attrs, long ctime, long mtime ) : void | ||
SmbFile ( ) : System | ||
SmbFile ( SmbFile context, string name, int type, int attributes, long createTime, long lastModified, long size ) : System | ||
ToUrl ( ) : Uri |
public CopyTo ( SmbFile dest ) : void | ||
dest | SmbFile | the destination file or directory |
return | void |
public Equals ( object obj ) : bool | ||
obj | object | Another SmbFile object to compare for equality |
return | bool |
public GetSecurity ( bool resolveSids ) : Ace[] | ||
resolveSids | bool | /// Attempt to resolve the SIDs within each ACE form /// their numeric representation to their corresponding account names. /// |
return | Ace[] |
public GetShareSecurity ( bool resolveSids ) : Ace[] | ||
resolveSids | bool | /// Attempt to resolve the SIDs within each ACE form /// their numeric representation to their corresponding account names. /// |
return | Ace[] |
public List ( ISmbFilenameFilter filter ) : string[] | ||
filter | ISmbFilenameFilter | a filename filter to exclude filenames from the results |
return | string[] |
public ListFiles ( ISmbFileFilter filter ) : SmbFile[] | ||
filter | ISmbFileFilter | a file filter to exclude files from the results |
return | SmbFile[] |
public ListFiles ( ISmbFilenameFilter filter ) : SmbFile[] | ||
filter | ISmbFilenameFilter | a filter to exclude files from the results |
return | SmbFile[] |
public ListFiles ( string wildcard ) : SmbFile[] | ||
wildcard | string | a wildcard expression |
return | SmbFile[] |
protected PathNamesPossiblyEqual ( string path1, string path2 ) : bool | ||
path1 | string | |
path2 | string | |
return | bool |
public RenameTo ( SmbFile dest ) : void | ||
dest | SmbFile | An SmbFile that represents the new pathname |
return | void |
public SetCreateTime ( long time ) : void | ||
time | long | the create time as milliseconds since Jan 1, 1970 |
return | void |
public SetLastModified ( long time ) : void | ||
time | long | the last modified time as milliseconds since Jan 1, 1970 |
return | void |
public SmbFile ( SmbFile context, string name ) : System | ||
context | SmbFile | A base SmbFile |
name | string | A path string relative to the parent paremeter |
return | System |
public SmbFile ( SmbFile context, string name, int shareAccess ) : System | ||
context | SmbFile | A base SmbFile |
name | string | A path string relative to the context file path |
shareAccess | int | Specifies what access other clients have while this file is open. /// |
return | System |
protected SmbFile ( Uri url ) : System | ||
url | Uri | The URL of the target resource |
return | System |
public SmbFile ( Uri url, NtlmPasswordAuthentication auth ) : System | ||
url | Uri | The URL of the target resource |
auth | NtlmPasswordAuthentication | The credentials the client should use for authentication |
return | System |
public SmbFile ( string url ) : System | ||
url | string | A URL string |
return | System |
public SmbFile ( string url, NtlmPasswordAuthentication auth ) : System | ||
url | string | A URL string |
auth | NtlmPasswordAuthentication | The credentials the client should use for authentication |
return | System |
public SmbFile ( string url, NtlmPasswordAuthentication auth, int shareAccess ) : System | ||
url | string | A URL string |
auth | NtlmPasswordAuthentication | The credentials the client should use for authentication |
shareAccess | int | Specifies what access other clients have while this file is open. /// |
return | System |
public SmbFile ( string context, string name ) : System | ||
context | string | A URL string |
name | string | A path string relative to the context paremeter |
return | System |
public SmbFile ( string context, string name, NtlmPasswordAuthentication auth ) : System | ||
context | string | A URL string |
name | string | A path string relative to the context paremeter |
auth | NtlmPasswordAuthentication | The credentials the client should use for authentication |
return | System |
public SmbFile ( string context, string name, NtlmPasswordAuthentication auth, int shareAccess ) : System | ||
context | string | A URL string |
name | string | A path string relative to the context paremeter |
auth | NtlmPasswordAuthentication | The credentials the client should use for authentication |
shareAccess | int | Specifies what access other clients have while this file is open. /// |
return | System |