OpenStack.Compute.v2_1.ServerCreateDefinition.LoadUserDataFromFile C# (CSharp) Method

LoadUserDataFromFile() public method

Load the UserData from the specified file path.
The specified path is invalid (for example, it is on an unmapped drive). An I/O error occurred while opening the file. This operation is not supported on the current platform.-or- specified a directory.-or- The caller does not have the required permission. The file specified in was not found. The caller does not have the required permission.
public LoadUserDataFromFile ( string path ) : void
path string The user data file path.
return void
        public void LoadUserDataFromFile(string path)
        {
            byte[] contents = File.ReadAllBytes(path);
            UserData = Convert.ToBase64String(contents);
        }