Skip to content
Paul Spangler edited this page May 9, 2019 · 2 revisions

NationalInstruments.SystemLink.Clients.File

Contents

FileUploader type

Namespace

NationalInstruments.SystemLink.Clients.File

Summary

Uploads files to SystemLink.

#ctor() constructor

Summary

Initializes a new file uploader which will communicate over HTTP using the configuration provided by SystemLink Client. The system must be either be registered to a SystemLink Server, or it must be a SystemLink server itself.

Parameters

This constructor has no parameters.

Exceptions
Name Description
NationalInstruments.SystemLink.Clients.Core.ApiException if the current system cannot communicate with a SystemLink Server,
or if the configuration provided by SystemLink Client cannot be found.

#ctor(configuration) constructor

Summary

Initializes a new file uploader which will communicate over HTTP using the configuration provided by configuration.

Parameters
Name Type Description
configuration NationalInstruments.SystemLink.Clients.Core.IHttpConfiguration Specifies the web server, authentication, and metadata to use for communication.
Exceptions
Name Description
System.ArgumentNullException if configuration is null.

UploadFile(path) method

Summary

Uploads a file to SystemLink.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFile(path,properties) method

Summary

Uploads a file to SystemLink with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFile(stream,name) method

Summary

Uploads stream data to SystemLink as a file.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

UploadFile(stream,name,properties) method

Summary

Uploads stream data to SystemLink as a file, with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

UploadFileAsync(path) method

Summary

Asynchronously uploads a file to SystemLink.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFileAsync(path,properties) method

Summary

Asynchronously uploads a file to SystemLink with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFileAsync(stream,name) method

Summary

Asynchronously uploads stream data to SystemLink as a file.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

UploadFileAsync(stream,name,properties) method

Summary

Asynchronously uploads stream data to SystemLink as a file, with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

IFileUploader type

Namespace

NationalInstruments.SystemLink.Clients.File

Summary

Uploads files to SystemLink.

UploadFile(path) method

Summary

Uploads a file to SystemLink.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFile(path,properties) method

Summary

Uploads a file to SystemLink with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFile(stream,name) method

Summary

Uploads stream data to SystemLink as a file.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

UploadFile(stream,name,properties) method

Summary

Uploads stream data to SystemLink as a file, with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

UploadFileAsync(path) method

Summary

Asynchronously uploads a file to SystemLink.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFileAsync(path,properties) method

Summary

Asynchronously uploads a file to SystemLink with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
path System.String The absolute path of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if path is null.
System.ArgumentException if path is empty.
System.UnauthorizedAccessException if the operating system denies access to path.
System.IO.PathTooLongException if path is longer than the system-defined maximum length.
System.IO.DirectoryNotFoundException if path contains a directory that cannot be found.
System.IO.FileNotFoundException if the file at path cannot be found.
System.NotSupportedException if path does not support the read operation.
System.IO.IOException if path cannot be accessed for any reason.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.

UploadFileAsync(stream,name) method

Summary

Asynchronously uploads stream data to SystemLink as a file.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.

UploadFileAsync(stream,name,properties) method

Summary

Asynchronously uploads stream data to SystemLink as a file, with metadata.

Returns

The ID of the uploaded file.

Parameters
Name Type Description
stream System.IO.Stream A stream of data to upload.
name System.String The name of the file.
properties System.Collections.Generic.IDictionary{System.String,System.String} A set of user-customizable queryable key-value-pairs attached to this file.
Exceptions
Name Description
System.ArgumentNullException if stream or name is null.
System.ArgumentException if stream does not support the read operation.
NationalInstruments.SystemLink.Clients.Core.ApiException if the File service API call fails.
System.IO.IOException if an error occurrs when reading stream.
Clone this wiki locally