FileUtil Interface |
Namespace: Zebra.Sdk.Device
The FileUtil type exposes the following members.
Name | Description | |
---|---|---|
RetrieveFileNames |
Retrieves the names of the files which are stored on the device.
| |
RetrieveFileNames(String) |
Retrieves the names of the files which are stored on the device.
| |
RetrieveObjectsProperties |
Retrieves the properties of the objects which are stored on the device.
| |
SendFileContents(String) |
Sends the contents of a file to the device.
| |
SendFileContents(String, ProgressMonitor) |
Sends the contents of a file to the device.
|
using System; using Zebra.Sdk.Comm; using Zebra.Sdk.Device; using Zebra.Sdk.Printer; public class FileUtilExample { public static void Main(string[] args) { Connection connection = new TcpConnection("192.168.1.100", TcpConnection.DEFAULT_ZPL_TCP_PORT); try { connection.Open(); ZebraPrinter printer = ZebraPrinterFactory.GetInstance(connection); printer.SendFileContents("C:\\Users\\[user]\\Documents\\labels\\sample.lbl"); string[] fileNames = printer.RetrieveFileNames(); foreach (string filename in fileNames) { Console.WriteLine(filename); } } catch (ConnectionException e) { Console.WriteLine(e.ToString()); } catch (ZebraPrinterLanguageUnknownException e) { Console.WriteLine(e.ToString()); } catch (ZebraIllegalArgumentException e) { Console.WriteLine(e.ToString()); } finally { connection.Close(); } } }